<?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 Some character data was lost during transcoding in the dataset in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469670#M120179</link>
    <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;While creating the table into oracle database by PROC SQL/Data step statement i'm getting "-" symbol got converted into "â€“" special character. Can anyone please suggest how to prevent the conversion.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Original Data is in SAS datasets is : "Infections - Viral Hepatitis - New or worsening"&lt;/P&gt;&lt;P&gt;After loading data into Oracle database it will become "Infections - Viral Hepatitis â€“ New or worsening"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Currently i'm using INENCODING=ANY OUTENCODING=ANY options with Libname statement.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When using INENCODING='UTF-8' OUTENCODING='UTF-8' options with libname then getting below error..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SAS Studio&lt;BR /&gt;ERROR: Some character data was lost during transcoding in the dataset TEST. Either the data contains characters that are not&lt;BR /&gt;representable in the new encoding or truncation occurred during transcoding.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
    <pubDate>Tue, 12 Jun 2018 16:27:54 GMT</pubDate>
    <dc:creator>singhsahab</dc:creator>
    <dc:date>2018-06-12T16:27:54Z</dc:date>
    <item>
      <title>Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469670#M120179</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;While creating the table into oracle database by PROC SQL/Data step statement i'm getting "-" symbol got converted into "â€“" special character. Can anyone please suggest how to prevent the conversion.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Original Data is in SAS datasets is : "Infections - Viral Hepatitis - New or worsening"&lt;/P&gt;&lt;P&gt;After loading data into Oracle database it will become "Infections - Viral Hepatitis â€“ New or worsening"&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;Currently i'm using INENCODING=ANY OUTENCODING=ANY options with Libname statement.&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;When using INENCODING='UTF-8' OUTENCODING='UTF-8' options with libname then getting below error..&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;SAS Studio&lt;BR /&gt;ERROR: Some character data was lost during transcoding in the dataset TEST. Either the data contains characters that are not&lt;BR /&gt;representable in the new encoding or truncation occurred during transcoding.&lt;/P&gt;&lt;P&gt;Thank you in advance.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 16:27:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469670#M120179</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-06-12T16:27:54Z</dc:date>
    </item>
    <item>
      <title>Re: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469697#M120191</link>
      <description>&lt;P&gt;Did you check what encoding is your SAS and Oracle.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;For SAS run:&amp;nbsp;&lt;STRONG&gt;proc options option=encoding; run;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;For Oracle run :&lt;STRONG&gt;&amp;nbsp;&lt;SPAN&gt;select * from nls_database_parameters where parameter = 'NLS_CHARACTERSET';&lt;/SPAN&gt;&lt;/STRONG&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;Make sure you have the right encoding for both.&lt;/P&gt;</description>
      <pubDate>Tue, 12 Jun 2018 17:54:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469697#M120191</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-12T17:54:42Z</dc:date>
    </item>
    <item>
      <title>Re: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469863#M120234</link>
      <description>&lt;P&gt;Hi Surya,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for your suggestion. I check and found my SAS 9.4 default encoding is "WLATIN1" and my oracle DB default encoding UTF-8.&lt;/P&gt;&lt;P&gt;Can you please suggest how to convert encoding&amp;nbsp;&lt;SPAN&gt;WLATIN1 to UTF-8 . i used outencoding options with libname statement&amp;nbsp;but getting the same error as earlier.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Please let me know if any other suggestion to pervert the conversion.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Many Thanks,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;A.K&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 10:01:25 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469863#M120234</guid>
      <dc:creator>singhsahab</dc:creator>
      <dc:date>2018-06-13T10:01:25Z</dc:date>
    </item>
    <item>
      <title>Re: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469914#M120258</link>
      <description>&lt;P&gt;Some chars in UTF-8 can't be converted to WLatin1, those chars are causing the trouble. Imho changing the encoding of the sas session is the only way to solve the issue. Session encoding can only be changed in the sas servers config files.&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:10:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469914#M120258</guid>
      <dc:creator>andreas_lds</dc:creator>
      <dc:date>2018-06-13T13:10:54Z</dc:date>
    </item>
    <item>
      <title>Re: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469920#M120259</link>
      <description>&lt;P&gt;You might have the UTF-8 PC SAS, Open Windows&amp;gt;All Progrms&amp;gt;SAS&amp;gt;SAS unicode uft8. Open this and work from here.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Also these might help:&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/51/586.html" target="_blank"&gt;http://support.sas.com/kb/51/586.html&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&lt;A href="http://support.sas.com/kb/15/597.html" target="_blank"&gt;http://support.sas.com/kb/15/597.html&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:23:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469920#M120259</guid>
      <dc:creator>SuryaKiran</dc:creator>
      <dc:date>2018-06-13T13:23:16Z</dc:date>
    </item>
    <item>
      <title>Re: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469921#M120260</link>
      <description>&lt;P&gt;Make SAS and Oracle has the same encoding.&lt;/P&gt;
&lt;P&gt;Check sasenv_local file .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;OR&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;OUTENCODING='WLATIN1'&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;WLATIN1 is your sas encoding. use this code check:&lt;/SPAN&gt;&lt;/P&gt;
&lt;P&gt;&lt;SPAN&gt;proc options option=encoding;run;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 13 Jun 2018 13:23:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/469921#M120260</guid>
      <dc:creator>Ksharp</dc:creator>
      <dc:date>2018-06-13T13:23:51Z</dc:date>
    </item>
    <item>
      <title>Re: Some character data was lost during transcoding in the dataset</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/678546#M204809</link>
      <description>&lt;P&gt;I transferred a SAS dataset from our Linux server to my Windows 10 laptop.&amp;nbsp; I've struggled trying to read this file using SAS 9.4 on my laptop.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I ran the following code in EG on the server to determine that the encoding on the server is UTF-8.&lt;/P&gt;
&lt;P&gt;proc options option=encoding; run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I opened SAS 9.4 with Unicode Support and ran the following code&lt;/P&gt;
&lt;P&gt;libname lib_in 'path to dir with file from server' inencoding='UTF-8';&lt;BR /&gt;libname lib_out 'path to save copy of file from server' outencoding=any;&lt;/P&gt;
&lt;P&gt;data lib_in.dsn;&lt;BR /&gt;set lib_out.dsn;&lt;BR /&gt;run;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This code ran error free.&amp;nbsp; Then I opened "normal" SAS 9.4 on my laptop and accessed the lib_out.dsn file successfully using the same libname option as above.&amp;nbsp;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;This worked for me.&lt;/P&gt;
&lt;P&gt;Lori&lt;/P&gt;</description>
      <pubDate>Fri, 21 Aug 2020 18:42:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Some-character-data-was-lost-during-transcoding-in-the-dataset/m-p/678546#M204809</guid>
      <dc:creator>LoriGoldman</dc:creator>
      <dc:date>2020-08-21T18:42:34Z</dc:date>
    </item>
  </channel>
</rss>

