<?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: Transcoding problem in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390052#M277590</link>
    <description>&lt;P&gt;I had a similar encoding problem recently and solved it this way using the OUTENCODING option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname inlib 'MyInputLibrary'; 
libname outlib 'MyOutputLibrary' outencoding=asciiany;
proc copy noclone in=inlib out=outlib;
   select MyDataset;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
    <pubDate>Tue, 22 Aug 2017 22:29:00 GMT</pubDate>
    <dc:creator>SASKiwi</dc:creator>
    <dc:date>2017-08-22T22:29:00Z</dc:date>
    <item>
      <title>Transcoding problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390028#M277587</link>
      <description>&lt;P&gt;I have a csv file with some non-English characters in it. Using data infile in regular SAS, once the foreign character is encountered, the system stops reading in more data and ignores&amp;nbsp;the remainder of the dataset, resulting in a large chunk of the file not imported. I then tried the same code under SAS 9.4 with unicode support, which seems to read in the correct number of rows. The problem is when I try to save it as a dataset on a pre-defined library:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;"ERROR: Some character data was lost during transcoding in the dataset lib1.dat1. Either the data&lt;BR /&gt;contains characters that are not representable in the new encoding or truncation occurred during transcoding."&lt;/P&gt;&lt;P&gt;and&amp;nbsp;&lt;/P&gt;&lt;P&gt;"WARNING: The data set lib1.data1&amp;nbsp;may be incomplete. When this step was stopped there were x observations and y variables." x is way less than the number of records in the dataset in the work library.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this because&amp;nbsp;dataset is currently in unicode and needs to be converted to regular coding somehow before it can be saved and used? Thanks.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 20:59:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390028#M277587</guid>
      <dc:creator>apolitical</dc:creator>
      <dc:date>2017-08-22T20:59:23Z</dc:date>
    </item>
    <item>
      <title>Re: Transcoding problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390046#M277588</link>
      <description>&lt;P&gt;this is an encoding issue. Encoding setting in sas config might defaulted to latin1. &amp;nbsp;we had problem like this before and we tried to fix it&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;with changing a session option, it did not worked out. What we were suggested at that point of time to change the encoding setting to UTF8 in sas config file.&lt;/P&gt;
&lt;P&gt;do a&amp;nbsp;&lt;/P&gt;
&lt;PRE class="codeFragment"&gt;proc options option=encoding;    
run; &lt;/PRE&gt;
&lt;P&gt;I think &amp;nbsp;you will see latin1 as your encoding.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;There might be another solution, but I am just sharing my experience.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 21:51:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390046#M277588</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-08-22T21:51:28Z</dc:date>
    </item>
    <item>
      <title>Re: Transcoding problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390049#M277589</link>
      <description>&lt;P&gt;Thanks. Actually I see " ENCODING=UTF-8" because I'm under SAS with unicode support I suppose. I am guessing that the problem of incampatibility arises when I try to save a dataset that's in unicode into a dataset in another coding, although I don't know why SAS would automatically&amp;nbsp;choose to save it in another coding format without asking, maybe that's the default.&lt;/P&gt;</description>
      <pubDate>Tue, 22 Aug 2017 22:11:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390049#M277589</guid>
      <dc:creator>apolitical</dc:creator>
      <dc:date>2017-08-22T22:11:30Z</dc:date>
    </item>
    <item>
      <title>Re: Transcoding problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390052#M277590</link>
      <description>&lt;P&gt;I had a similar encoding problem recently and solved it this way using the OUTENCODING option:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname inlib 'MyInputLibrary'; 
libname outlib 'MyOutputLibrary' outencoding=asciiany;
proc copy noclone in=inlib out=outlib;
   select MyDataset;
run;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Tue, 22 Aug 2017 22:29:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390052#M277590</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2017-08-22T22:29:00Z</dc:date>
    </item>
    <item>
      <title>Re: Transcoding problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390067#M277591</link>
      <description>&lt;P&gt;please check this below link&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/41/925.html" target="_blank"&gt;http://support.sas.com/kb/41/925.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 23 Aug 2017 00:01:05 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390067#M277591</guid>
      <dc:creator>kiranv_</dc:creator>
      <dc:date>2017-08-23T00:01:05Z</dc:date>
    </item>
    <item>
      <title>Re: Transcoding problem</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390312#M277592</link>
      <description>Thanks everyone for the advice. I also found adding an encoding option in the data step can work:&lt;BR /&gt;data lib1.data1 (encoding=any);&lt;BR /&gt;set data1;&lt;BR /&gt;run;</description>
      <pubDate>Wed, 23 Aug 2017 15:54:32 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Transcoding-problem/m-p/390312#M277592</guid>
      <dc:creator>apolitical</dc:creator>
      <dc:date>2017-08-23T15:54:32Z</dc:date>
    </item>
  </channel>
</rss>

