<?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: INPUT statement treatment of &amp;quot;accented&amp;quot; ASCII chars in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177795#M34010</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be more specific, the pointer isn't "jumping backwards". I'm trying to read the field at position 100 (@100) for example, but when there is "Café" in the preceding field, position 100 is blank and the data is actually at 101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always assume I'm dealing with ASCII when reading text files on a PC, and the file is sourced from USA. So I downloaded Notepad++, found the encoding was UTF-8, put that option on the INFILE, and it works fine now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip!&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Feb 2014 12:02:03 GMT</pubDate>
    <dc:creator>dmorrell</dc:creator>
    <dc:date>2014-02-18T12:02:03Z</dc:date>
    <item>
      <title>INPUT statement treatment of "accented" ASCII chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177793#M34008</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Reading a flat text file in ASCII, fixed length records, fixed-width fields. One field is department name and the word "Café" appears in it. On the records where this happens, INPUT pointer jumps backwards 1 byte and therefore my @xx specs are all off for the remainder of the record and the data gets hosed.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is there an INFILE option or parm that I can use to keep everything lined up?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thanks&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 03:49:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177793#M34008</guid>
      <dc:creator>dmorrell</dc:creator>
      <dc:date>2014-02-18T03:49:03Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT statement treatment of "accented" ASCII chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177794#M34009</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Are you sure your text file is ASCII and not ANSI or UTF? A good way to check is opening the file with Notepad++ and there check in the encoding menu what it tells you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Not sure why your pointer would be "jumping backwards" but I sure had already my fun with the "é". There is an "encoding" option available for the infile statement which you should set to the value of your source file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 08:41:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177794#M34009</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-02-18T08:41:02Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT statement treatment of "accented" ASCII chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177795#M34010</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;To be more specific, the pointer isn't "jumping backwards". I'm trying to read the field at position 100 (@100) for example, but when there is "Café" in the preceding field, position 100 is blank and the data is actually at 101.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I always assume I'm dealing with ASCII when reading text files on a PC, and the file is sourced from USA. So I downloaded Notepad++, found the encoding was UTF-8, put that option on the INFILE, and it works fine now!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for the tip!&lt;/P&gt;&lt;P&gt;Doug&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 12:02:03 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177795#M34010</guid>
      <dc:creator>dmorrell</dc:creator>
      <dc:date>2014-02-18T12:02:03Z</dc:date>
    </item>
    <item>
      <title>Re: INPUT statement treatment of "accented" ASCII chars</title>
      <link>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177796#M34011</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The encoding of the little e with accent uses obviously 2 bytes but you're only reading the first byte with ASCII (and then you get one byte "behind").&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Feb 2014 21:52:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/INPUT-statement-treatment-of-quot-accented-quot-ASCII-chars/m-p/177796#M34011</guid>
      <dc:creator>Patrick</dc:creator>
      <dc:date>2014-02-18T21:52:38Z</dc:date>
    </item>
  </channel>
</rss>

