<?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: failed to transcode data from utf-8 to utf-16le encoding in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/637942#M189683</link>
    <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing the same problem while trying to import an excel file to Enterprise Guide. Can you please provide details about the changes you made? I cannot find the way to change SAS configuration or where to insert the "&lt;SPAN&gt;inencoding=wlatin2" option. Thank you in advance.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
    <pubDate>Mon, 06 Apr 2020 20:45:08 GMT</pubDate>
    <dc:creator>Vassilis</dc:creator>
    <dc:date>2020-04-06T20:45:08Z</dc:date>
    <item>
      <title>failed to transcode data from utf-8 to utf-16le encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/567552#M159614</link>
      <description>&lt;P&gt;Hello SAS Colleagues,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am encountering this error while working on a dataset that earlier imported from a websource:&lt;/P&gt;&lt;P&gt;"Failed to transcode data from utf-8 to utf-16le encoding because it contained characters which are not supported by your SAS session encoding..." (screen-shot attached).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have already configured my SAS to "u8" version long before importing this data; and it is still the same. Also, I find this message is strange as usually it is reverse (as per my websearch).&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Moreover, also noticed: SAS 9.4 is 64-bit while Enterprise Guide is 32-bit. Not sure if this is causing the problem.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It will be great if someone can help me &lt;span class="lia-unicode-emoji" title=":slightly_smiling_face:"&gt;🙂&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="SAS error message.PNG" style="width: 600px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/30421i82CF789DE2DDCFC6/image-size/large?v=v2&amp;amp;px=999" role="button" title="SAS error message.PNG" alt="SAS error message.PNG" /&gt;&lt;/span&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 20 Jun 2019 08:13:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/567552#M159614</guid>
      <dc:creator>RealePrimavera</dc:creator>
      <dc:date>2019-06-20T08:13:46Z</dc:date>
    </item>
    <item>
      <title>Re: failed to transcode data from utf-8 to utf-16le encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/568207#M159896</link>
      <description>&lt;P&gt;May be it has been discussed here (&lt;A href="https://communities.sas.com/t5/SAS-Enterprise-Guide/Encoding-Issue-UTF8-to-UTF-16-le/td-p/380048" target="_blank"&gt;https://communities.sas.com/t5/SAS-Enterprise-Guide/Encoding-Issue-UTF8-to-UTF-16-le/td-p/380048&lt;/A&gt;)&lt;/P&gt;</description>
      <pubDate>Sun, 23 Jun 2019 11:32:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/568207#M159896</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-06-23T11:32:59Z</dc:date>
    </item>
    <item>
      <title>Re: failed to transcode data from utf-8 to utf-16le encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/568224#M159900</link>
      <description>Character encoding is a tricky thing to deal with.&lt;BR /&gt;&lt;BR /&gt;I don't have access to Enterprise Guide but had I faced the same issue on SAS Studio,I would have done the below mentioned steps.&lt;BR /&gt;&lt;BR /&gt;If you try to add "PUTLOG _ALL_" at the beginning of the DATA/PROC step and scan each line for _ERROR_ and _N_, you may find the first offending line (the value of _N_) where it says _ERROR_=1.&lt;BR /&gt;Open the file in the native program (using which the data file was written) or even notepad/vi is a good idea and go to that line and see which character is causing the error.&lt;BR /&gt;&lt;BR /&gt;Please let me know if this was of any help.&lt;BR /&gt;Thank you.</description>
      <pubDate>Sun, 23 Jun 2019 16:55:59 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/568224#M159900</guid>
      <dc:creator>koyelghosh</dc:creator>
      <dc:date>2019-06-23T16:55:59Z</dc:date>
    </item>
    <item>
      <title>Re: failed to transcode data from utf-8 to utf-16le encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/570648#M160941</link>
      <description>&lt;P&gt;So, my solution for this error (credit goes to my project leader):&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;first, to change back my sas configuration to "en" from "u8" that I was using for certain files.&amp;nbsp;&lt;/P&gt;&lt;P&gt;second, assign libname for folders of all "u8" sas files with the option "inencoding=wlatin2".&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hope this will be helpful for someone else like me encountering problems with characters.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;</description>
      <pubDate>Tue, 02 Jul 2019 17:43:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/570648#M160941</guid>
      <dc:creator>RealePrimavera</dc:creator>
      <dc:date>2019-07-02T17:43:21Z</dc:date>
    </item>
    <item>
      <title>Re: failed to transcode data from utf-8 to utf-16le encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/637942#M189683</link>
      <description>&lt;P&gt;Hello,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am facing the same problem while trying to import an excel file to Enterprise Guide. Can you please provide details about the changes you made? I cannot find the way to change SAS configuration or where to insert the "&lt;SPAN&gt;inencoding=wlatin2" option. Thank you in advance.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 06 Apr 2020 20:45:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/637942#M189683</guid>
      <dc:creator>Vassilis</dc:creator>
      <dc:date>2020-04-06T20:45:08Z</dc:date>
    </item>
    <item>
      <title>Re: failed to transcode data from utf-8 to utf-16le encoding</title>
      <link>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/637996#M189705</link>
      <description>&lt;P&gt;Sure&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/321208"&gt;@Vassilis&lt;/a&gt; .&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) You can change the configuration in the config. file that you should see in your C:. A path will be something similar to :&lt;/P&gt;&lt;P&gt;C:/program files/SAS Home/SAS Foundation/9.4/sasv9.cfg&lt;/P&gt;&lt;P&gt;This should open a text file where you can see nls\en\sasv9: change "en" to "u8".&lt;/P&gt;&lt;P&gt;(See for more details:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=dplyml0phy0win&amp;amp;docsetTarget=p61010as31914aa4aa1477100150.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=dplyml0phy0win&amp;amp;docsetTarget=p61010as31914aa4aa1477100150.htm&amp;amp;docsetVersion=3.4&amp;amp;locale=en&lt;/A&gt;)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have special characters in excel file; this step should be enough.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2) But if in future you would need to convert this sas dataset again to english version (bz sometimes merging datasets require the same config in all datasets):&lt;/P&gt;&lt;P&gt;Then import with libname where you need to specify inencoding=wlatin1 or wlatin2.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;(See for more details:&amp;nbsp;&lt;A href="https://documentation.sas.com/?docsetId=nlsref&amp;amp;docsetTarget=n02q3gv9mfdwnmn1ca9kqa3gbayl.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en"&gt;https://documentation.sas.com/?docsetId=nlsref&amp;amp;docsetTarget=n02q3gv9mfdwnmn1ca9kqa3gbayl.htm&amp;amp;docsetVersion=9.4&amp;amp;locale=en)&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 07 Apr 2020 07:32:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/failed-to-transcode-data-from-utf-8-to-utf-16le-encoding/m-p/637996#M189705</guid>
      <dc:creator>RealePrimavera</dc:creator>
      <dc:date>2020-04-07T07:32:14Z</dc:date>
    </item>
  </channel>
</rss>

