<?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 display data that causes WARNING: A character that could not be transcoded was encountered. in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/display-data-that-causes-WARNING-A-character-that-could-not-be/m-p/617162#M180796</link>
    <description>&lt;P&gt;I know this topic has been covered before, but here's my question&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am reading this file, the notepad++ indicates that it is a utf-8 bom file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While reading the file with encoding utf-8 i get all my danish characters æøå correctly but there are som characters that can not be transcoded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It gives me the warning&amp;nbsp;&lt;/P&gt;&lt;P&gt;reading csv gives me WARNING: A character that could not be transcoded was encountered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a way to locate what those characters are so i can modify the file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i locate and write out characters that can not be transcoded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;filename sim  'L:\Work\SIJ\releaseinfo\releaseinfo\releaseinfo7.csv';
filename out  'L:\Work\SIJ\releaseinfo\releaseinfo\releaseinfo7-out.csv';
   data test;
 	infile sim lrecl= 2000 encoding="utf-8";
	file  out lrecl=2000 encoding='utf-8';
   	

	input;
	put _infile_;
run;&lt;/PRE&gt;&lt;P&gt;running sas 9.2 from SAS-EG 4.3&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 14 Jan 2020 10:51:14 GMT</pubDate>
    <dc:creator>havmaage</dc:creator>
    <dc:date>2020-01-14T10:51:14Z</dc:date>
    <item>
      <title>display data that causes WARNING: A character that could not be transcoded was encountered.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/display-data-that-causes-WARNING-A-character-that-could-not-be/m-p/617162#M180796</link>
      <description>&lt;P&gt;I know this topic has been covered before, but here's my question&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am reading this file, the notepad++ indicates that it is a utf-8 bom file&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;While reading the file with encoding utf-8 i get all my danish characters æøå correctly but there are som characters that can not be transcoded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;It gives me the warning&amp;nbsp;&lt;/P&gt;&lt;P&gt;reading csv gives me WARNING: A character that could not be transcoded was encountered.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am looking for a way to locate what those characters are so i can modify the file.&amp;nbsp;&lt;/P&gt;&lt;P&gt;How do i locate and write out characters that can not be transcoded.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;filename sim  'L:\Work\SIJ\releaseinfo\releaseinfo\releaseinfo7.csv';
filename out  'L:\Work\SIJ\releaseinfo\releaseinfo\releaseinfo7-out.csv';
   data test;
 	infile sim lrecl= 2000 encoding="utf-8";
	file  out lrecl=2000 encoding='utf-8';
   	

	input;
	put _infile_;
run;&lt;/PRE&gt;&lt;P&gt;running sas 9.2 from SAS-EG 4.3&amp;nbsp;&lt;/P&gt;&lt;P&gt;THX&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 14 Jan 2020 10:51:14 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/display-data-that-causes-WARNING-A-character-that-could-not-be/m-p/617162#M180796</guid>
      <dc:creator>havmaage</dc:creator>
      <dc:date>2020-01-14T10:51:14Z</dc:date>
    </item>
    <item>
      <title>Re: display data that causes WARNING: A character that could not be transcoded was encountered.</title>
      <link>https://communities.sas.com/t5/SAS-Programming/display-data-that-causes-WARNING-A-character-that-could-not-be/m-p/617709#M181054</link>
      <description>&lt;P&gt;I assume your SAS session is not using UTF-8 encoding, meaning that some of the characters in the file cannot be converted to the Danish 8-bit character set you are using. One way to find this may be to read the file into two datasets, one of them having utf-8 encoding:&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data standard utf8(encoding='utf-8');
  infile sim dsd delimiter=';' encoding='utf-8';
  /* here go your statements to read the variables from the .csv file */
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;You should then have to datasets, one of them in your normal encoding, and the other in UTF-8. Running a PROC COMPARE may then show you which variables were not translatable.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 16 Jan 2020 08:32:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/display-data-that-causes-WARNING-A-character-that-could-not-be/m-p/617709#M181054</guid>
      <dc:creator>s_lassen</dc:creator>
      <dc:date>2020-01-16T08:32:30Z</dc:date>
    </item>
  </channel>
</rss>

