<?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: Read Dataset exporting wrong characters in Application Development and Automation Discussions</title>
    <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127463#M1511987</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check with your basis guy if the code page what is set is having these special characters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Page transaction SCP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br, &lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 02 Aug 2010 07:20:10 GMT</pubDate>
    <dc:creator>Former Member</dc:creator>
    <dc:date>2010-08-02T07:20:10Z</dc:date>
    <item>
      <title>Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127459#M1511983</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have two reports, one that creates files on the application server, and another that reads the contents of the files and shows them using the WRITE instruction.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;When I use the first report and then download the file to my computer (using CG3Y) everything is alright. But when I use the second report some of the characters (Portuguese special characters, e.g. á, ã, é, etc.) that are shown are wrong:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Original:&lt;/P&gt;&lt;P&gt;2B002AG0262350100000660000000100020REF_002             Joaquim Neves              Transf. Bancária    Indeminização       &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Output:&lt;/P&gt;&lt;P&gt;2B002AG0262350100000660000000100020REF_002             Joaquim Neves              Transf. BancÃ¡ria    IndeminizaÃ§Ã£o&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The code I'm using to read the files and show their data is:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;abrir ficheiro&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;open dataset lv_filename for input&lt;/P&gt;&lt;P&gt;  in text mode&lt;/P&gt;&lt;P&gt;  encoding default.&lt;/P&gt;&lt;P&gt;if sy-subrc eq 0.&lt;/P&gt;&lt;UL&gt;&lt;LI level="1" type="ul"&gt;&lt;P&gt;exportar todos os registos para o ecran&lt;/P&gt;&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;  do.&lt;/P&gt;&lt;P&gt;    clear lv_output.&lt;/P&gt;&lt;P&gt;    read dataset lv_filename into lv_output&lt;/P&gt;&lt;P&gt;      maximum length lv_length.&lt;/P&gt;&lt;P&gt;    if sy-subrc eq 0.&lt;/P&gt;&lt;P&gt;      write lv_output.&lt;/P&gt;&lt;P&gt;    else.&lt;/P&gt;&lt;P&gt;      exit.&lt;/P&gt;&lt;P&gt;    endif.&lt;/P&gt;&lt;P&gt;  enddo.&lt;/P&gt;&lt;P&gt;endif.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;close dataset lv_filename.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Can anyone help me on this?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;/P&gt;&lt;P&gt;  Mário Espinheira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 11:10:26 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127459#M1511983</guid>
      <dc:creator>mrio_espinheira</dc:creator>
      <dc:date>2010-07-30T11:10:26Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127460#M1511984</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mario,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I presume this is due to the GUI problem.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do as specified below. Hope this should solve the issue.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;ALt+F12&lt;DEL&gt;-&amp;gt; Options&lt;/DEL&gt;&amp;gt;I18N---&amp;gt; Check the Activate the multibyte functionalities&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then restart ur PC and try downloading.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know If you still have any issues.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 11:17:54 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127460#M1511984</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-07-30T11:17:54Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127461#M1511985</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It didn't work, the contents of the files are still shown with the wrong special characters.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the suggestion anyway &lt;SPAN __jive_emoticon_name="happy"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 30 Jul 2010 11:31:41 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127461#M1511985</guid>
      <dc:creator>mrio_espinheira</dc:creator>
      <dc:date>2010-07-30T11:31:41Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127462#M1511986</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mario,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I presume your environment is Unicode.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;In Unicode programs, only the content of character-type data objects can be transferred to text files and read from text files. The addition encoding must be specified in Unicode programs, and can only be omitted in non-Unicode programs. 

OPEN DATASET filename FOR OUTPUT IN TEXT MODE ENCODING DEFAULT.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;OR&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;Try using method gui_upload of class cl_gui_front_end_services instead of open dataset.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 07:16:21 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127462#M1511986</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T07:16:21Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127463#M1511987</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi , &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Check with your basis guy if the code page what is set is having these special characters. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Code Page transaction SCP. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Br, &lt;/P&gt;&lt;P&gt;Vijay&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 07:20:10 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127463#M1511987</guid>
      <dc:creator>Former Member</dc:creator>
      <dc:date>2010-08-02T07:20:10Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127464#M1511988</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm already opening the dataset as you said, and the class CL_GUI_FRONTEND_SERVICES only works with files from the Client PC, not with files from the Application Server like I need it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kind regards,&lt;/P&gt;&lt;P&gt;  Mário Espinheira&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 10:59:34 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127464#M1511988</guid>
      <dc:creator>mrio_espinheira</dc:creator>
      <dc:date>2010-08-02T10:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127465#M1511989</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I tried with UTF-8 encoding &amp;amp; seems to work for me.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE&gt;&lt;CODE&gt;DATA: v_asfile TYPE fileextern VALUE '/tmp/Unicode.txt',
      v_string TYPE string.

OPEN DATASET v_asfile FOR INPUT IN TEXT MODE ENCODING UTF-8.

DO.
  READ DATASET v_asfile INTO v_string.
  IF sy-subrc = 0.
    WRITE / v_string.
  ELSE.
    EXIT.
  ENDIF.
ENDDO.&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BR,&lt;/P&gt;&lt;P&gt;Suhas&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 11:22:03 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127465#M1511989</guid>
      <dc:creator>SuhaSaha</dc:creator>
      <dc:date>2010-08-02T11:22:03Z</dc:date>
    </item>
    <item>
      <title>Re: Read Dataset exporting wrong characters</title>
      <link>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127466#M1511990</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;DEL&gt;Tried with encoding UTF-8 and it worked also. Full points awarded.&lt;/DEL&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The problem was reading a backup file that was copied using FM EPS_FTP_PUT. When I read the original file it's all ok.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Edited by: Mario Espinheira on Sep 23, 2010 12:18 PM&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 02 Aug 2010 11:27:48 GMT</pubDate>
      <guid>https://community.sap.com/t5/application-development-and-automation-discussions/read-dataset-exporting-wrong-characters/m-p/7127466#M1511990</guid>
      <dc:creator>mrio_espinheira</dc:creator>
      <dc:date>2010-08-02T11:27:48Z</dc:date>
    </item>
  </channel>
</rss>

