3 Replies Latest reply on Aug 11, 2021 1:16 PM by Nico Heinze

    Replace SUB character from the source

    Arun Kumar Guru

      Hi,

       

      I am loading data from oracle source table to a flat file. Both in oracle and flat file i am seeing a SUB character [] (a box) in between the string value. For example like this - AA. PIER   EXIMPORT. The value i see in the html is \u001A and i tried removing using replacechr(0,ADDR_LN1,' \u001A',''), but its not working.

       

      How can i remove this in Informatica?

       

      Thanks,
      Arun

        • 1. Re: Replace SUB character from the source
          Nico Heinze Guru

          PowerCenter transformation language doesn't understand any Unicode syntax. Please use this:

              ReplaceChr( 1, ADDR_LN1, Chr( 26), '')

           

          Regards,

          Nico

          • 2. Re: Replace SUB character from the source
            Arun Kumar Guru

            This works in clearing the issue of [] but i noticed one thing. The string which was like HARFREY€™S ROAD (we have few of this) becomes HARFREY€™S ROAD.

            • 3. Re: Replace SUB character from the source
              Nico Heinze Guru

              To me it is obvious that you have a problem with source or target code page settings.

              The function use as I've described it will never (I repeat it: NEVER) change anything but the 0x1a character. So there must be some other reason why characters are changed, and most likely the point is that either the source data are not read correctly (e.g. the source DB is set to ISO 8859-1 but in PowerCenter the source code page is set as ISO 8859-5. Or, even worse, the source is set up in ISO 8859-1 but the definition in PowerCenter is UTF-8.

               

              Also please note that PowerCenter cannot handle Unicode characters beyond U+FFFF correctly.

               

              Regards,

              Nico