<?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: Encoding error? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197175#M305397</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;I found this thread &lt;A __default_attr="61683" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/" modifiedtitle="true" title="Help reading in File, might be encoding problem?"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;and rewrote my SAS code as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;filename rf2015 "&lt;SPAN style="background-color: #ffffff;"&gt;C:\Users\kwong\Documents\RF2015.csv&lt;/SPAN&gt;" encoding="utf-16";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;PROC IMPORT OUT= WORK.rf2015 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= rf2015 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=CSV dbms=dlm REPLACE; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; delimiter='09'x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; GETNAMES=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; DATAROW=2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; GUESSINGROWS=2147483647; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;When I checked the log window, the corresponding note on encoding has gone and the data seems fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Can someone please confirm if my code is right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Thank you very much.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 09 Mar 2015 06:19:06 GMT</pubDate>
    <dc:creator>Miracle</dc:creator>
    <dc:date>2015-03-09T06:19:06Z</dc:date>
    <item>
      <title>Encoding error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197174#M305396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;How are you?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Can I please ask what does this note mean after I run the SAS import procedure? &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;NOTE: A byte order mark in the file "C:\Users\kwong\Documents\RF2015.csv" (for fileref "#LN00643") indicates that the &lt;/SPAN&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt; line-height: 1.5em;"&gt;data is encoded in "utf-16le".&amp;nbsp; This encoding will be used to process the file. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt; line-height: 1.5em;"&gt;How do I resolve it? I'm running SAS9.3 TS Level 1M0 on W32_7PRO platform.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt; line-height: 1.5em;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Thank you very much.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 05:24:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197174#M305396</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2015-03-09T05:24:41Z</dc:date>
    </item>
    <item>
      <title>Re: Encoding error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197175#M305397</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Dear all,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;I found this thread &lt;A __default_attr="61683" __jive_macro_name="thread" class="jive_macro jive_macro_thread" href="https://communities.sas.com/" modifiedtitle="true" title="Help reading in File, might be encoding problem?"&gt;&lt;/A&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;and rewrote my SAS code as &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;filename rf2015 "&lt;SPAN style="background-color: #ffffff;"&gt;C:\Users\kwong\Documents\RF2015.csv&lt;/SPAN&gt;" encoding="utf-16";&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;PROC IMPORT OUT= WORK.rf2015 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DATAFILE= rf2015 &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; DBMS=CSV dbms=dlm REPLACE; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; delimiter='09'x;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; GETNAMES=YES;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; DATAROW=2; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&amp;nbsp; GUESSINGROWS=2147483647; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;RUN;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;When I checked the log window, the corresponding note on encoding has gone and the data seems fine.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Can someone please confirm if my code is right?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-family: 'times new roman', times; font-size: 12pt;"&gt;Thank you very much.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 06:19:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197175#M305397</guid>
      <dc:creator>Miracle</dc:creator>
      <dc:date>2015-03-09T06:19:06Z</dc:date>
    </item>
    <item>
      <title>Re: Encoding error?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197176#M305398</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm a little concerned with the two dbms= options; apart from that, the code looks good. You could try to reduce the guessingrows, as these tend to be very bad for performance (the lookup for correct data types will take longer than the actual import).&lt;/P&gt;&lt;P&gt;If the structure of the csv file will not be subject to changes that your program needs to automatically adapt to, I suggest you take the data step code created by proc import and use that in the future.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Mar 2015 08:11:55 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/Encoding-error/m-p/197176#M305398</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2015-03-09T08:11:55Z</dc:date>
    </item>
  </channel>
</rss>

