<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Re: Checking a file for Unicode errors in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-a-file-for-unicode-errors/m-p/12463924#M2000396</link>
    <description>&lt;P&gt;Hi Glen,&lt;BR /&gt;&lt;BR /&gt;I'm not sure about programming from scratch, but have you consider the existing tools:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/747615" target="_blank"&gt;747615&lt;/A&gt; – Tool for converting files from one code page to another&lt;BR /&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/752859" target="_blank"&gt;752859&lt;/A&gt; – sapiconv – a tool for converting the encoding of files&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Cris&lt;/P&gt;</description>
    <pubDate>Wed, 09 Jun 2021 15:52:54 GMT</pubDate>
    <dc:creator>cris_hansen</dc:creator>
    <dc:date>2021-06-09T15:52:54Z</dc:date>
    <item>
      <title>Checking a file for Unicode errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-a-file-for-unicode-errors/m-p/12463923#M2000395</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
  &lt;P&gt;I apologise in advance for the dumb questions I post here.&lt;/P&gt;
  &lt;P&gt;I would like to test a file on the SAP server for unicode errors, and replace the faulty characters with a default character. For example, we might have 'iński' where the ń is not recognized in our system. What we see in AL11 is in fact 'iE#ski' i.e. the string become longer by 1 character. I am thinking of doing this as per the code below. &lt;/P&gt;
  &lt;PRE&gt;&lt;CODE&gt;  DATA: ltext(340).
  OPEN DATASET sp_filei FOR INPUT IN TEXT MODE ENCODING UTF-8.
  DO.
    READ DATASET sp_filei INTO ltext.
    IF sy-subrc &amp;lt;&amp;gt; 0.
      EXIT.
    ENDIF.
    TRY.
        conv = cl_abap_conv_x2x_ce=&amp;gt;create(
             in_encoding  = '4102'
             out_encoding = '4110'
             input = gv_xstring ).
      CATCH cx_sy_codepage_converter_init.
        MESSAGE a218(fz) WITH in_encoding '4110'.
    ENDTRY.&lt;BR /&gt;&lt;/CODE&gt;&lt;/PRE&gt;
  &lt;P&gt;This of course doesn't work because I am reading the values into a text field and not xstring, however when I use xstring the program dumps.&lt;/P&gt;
  &lt;P&gt;I need somehow to pick up that that there is a faulty character, in this case 'ń' and replace it with the value available in our mapping table i.e. 'n' (a normal n).&lt;/P&gt;
  &lt;P&gt;All help greatly appreciated.&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 15:01:12 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-a-file-for-unicode-errors/m-p/12463923#M2000395</guid>
      <dc:creator>former_member201275</dc:creator>
      <dc:date>2021-06-09T15:01:12Z</dc:date>
    </item>
    <item>
      <title>Re: Checking a file for Unicode errors</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/checking-a-file-for-unicode-errors/m-p/12463924#M2000396</link>
      <description>&lt;P&gt;Hi Glen,&lt;BR /&gt;&lt;BR /&gt;I'm not sure about programming from scratch, but have you consider the existing tools:&lt;BR /&gt;&lt;BR /&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/747615" target="_blank"&gt;747615&lt;/A&gt; – Tool for converting files from one code page to another&lt;BR /&gt;&lt;A href="https://launchpad.support.sap.com/#/notes/752859" target="_blank"&gt;752859&lt;/A&gt; – sapiconv – a tool for converting the encoding of files&lt;BR /&gt;&lt;BR /&gt;Regards,&lt;BR /&gt;Cris&lt;/P&gt;</description>
      <pubDate>Wed, 09 Jun 2021 15:52:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/checking-a-file-for-unicode-errors/m-p/12463924#M2000396</guid>
      <dc:creator>cris_hansen</dc:creator>
      <dc:date>2021-06-09T15:52:54Z</dc:date>
    </item>
  </channel>
</rss>

