<?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 strange character appear after conversion from sas dataset to csv in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890192#M351750</link>
    <description>&lt;P&gt;I converted sas dataset into csv using encoding utf8 and it looks fine when shown on notepad. when I try to load into db2, strangely in each result csv the first character has a strange character u[feff]', could you let me know why this happen?&lt;/P&gt;</description>
    <pubDate>Mon, 21 Aug 2023 13:07:30 GMT</pubDate>
    <dc:creator>HeatherNewton</dc:creator>
    <dc:date>2023-08-21T13:07:30Z</dc:date>
    <item>
      <title>strange character appear after conversion from sas dataset to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890192#M351750</link>
      <description>&lt;P&gt;I converted sas dataset into csv using encoding utf8 and it looks fine when shown on notepad. when I try to load into db2, strangely in each result csv the first character has a strange character u[feff]', could you let me know why this happen?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 13:07:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890192#M351750</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2023-08-21T13:07:30Z</dc:date>
    </item>
    <item>
      <title>Re: strange character appear after conversion from sas dataset to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890194#M351752</link>
      <description>&lt;P&gt;That is the &lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark" target="_self"&gt;BYTE ORDER MARK&lt;/A&gt; or BOM.&lt;/P&gt;
&lt;P&gt;You should check with DB2 commands you are using to see how you can get it to ignore the BOM.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Otherwise just don't include the BOM when writing the file, as explained in the question from years ago.&lt;/P&gt;
&lt;P&gt;&lt;A href="https://communities.sas.com/t5/SAS-Programming/Write-a-file-in-UTF-8-without-BOM/td-p/561069" target="_blank"&gt;https://communities.sas.com/t5/SAS-Programming/Write-a-file-in-UTF-8-without-BOM/td-p/561069&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 14:25:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890194#M351752</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-21T14:25:42Z</dc:date>
    </item>
    <item>
      <title>Re: strange character appear after conversion from sas dataset to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890206#M351754</link>
      <description>&lt;P&gt;does it only happen to the first character as an additional character and I can remove it such the rest of the file is same or original?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 14:29:27 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890206#M351754</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2023-08-21T14:29:27Z</dc:date>
    </item>
    <item>
      <title>Re: strange character appear after conversion from sas dataset to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890230#M351755</link>
      <description>&lt;P&gt;The BOM is the start of the file.&amp;nbsp; Normal code should recognize it and IGNORE it (and also inform how they interpret the rest of the file).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;If you set the SAS option NOBOMFILE option before you create the CSV file then it will not be written to the file at all.&amp;nbsp; That should allow your confused DB2 load program to load the data.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;A href="https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n0ovum2tekkxadn1jel1gkpj5wx8.htm" target="_blank" rel="noopener"&gt;https://documentation.sas.com/doc/en/pgmsascdc/9.4_3.5/nlsref/n0ovum2tekkxadn1jel1gkpj5wx8.htm&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 16:17:00 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890230#M351755</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-21T16:17:00Z</dc:date>
    </item>
    <item>
      <title>Re: strange character appear after conversion from sas dataset to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890232#M351756</link>
      <description>&lt;P&gt;I can’t convert again so must change db2 command or remove them.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;something worry me, before I used encoding ‘any’ to convert saw datasets to csv&lt;/P&gt;
&lt;P&gt;but some columns cannot show in db2 due to character conversion problem, so I used utf8 but I am worried that some data originally showing fine cannot show as I am not using encoding ‘any’, what can’t of encoding would be a problem.. I remember seeing different data format in some SAS programs.. but I must say most should work with utf8?&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 16:27:52 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890232#M351756</guid>
      <dc:creator>HeatherNewton</dc:creator>
      <dc:date>2023-08-21T16:27:52Z</dc:date>
    </item>
    <item>
      <title>Re: strange character appear after conversion from sas dataset to csv</title>
      <link>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890234#M351757</link>
      <description>&lt;P&gt;You will need to discuss with your database administrator how DB2 is configured to handle UTF-8 encoded text (or if it even can).&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The original ASCII encoding used only 7 bits and so there were only 128 possible characters that could be represented.&amp;nbsp; Of those the first 31 and the last 1 where used for non-printable control characters.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;As people started using computers for more than just programming numbers they first expanded to using all 8 bits of a byte to represent characters.&amp;nbsp; So know you had another 128 characters that could be encoded.&amp;nbsp; But which characters should be added?&amp;nbsp; Some encodings like WLATIN1 add characters from "western" languages, like French and Spanish.&amp;nbsp; Others used the extra characters for mathematical symbols. etc.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The UTF-8 coding scheme using multiple bytes for some characters.&amp;nbsp; The original 128 7-bit ASCII characters are the same, but for the other characters it uses 2,3 or even 4 bytes to store them.&amp;nbsp; This allows for thousands of characters to be represented. But it makes dealing with character strings more complex.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Conversion from any particular single byte encoding, such as WLATIN1, to UTF-8 is simple.&amp;nbsp; But trying to convert from UTF-8 to some other single byte encoding might fail if none of the 256 codes in that single byte encoding represents the code that is in the UTF-8 string.&lt;/P&gt;</description>
      <pubDate>Mon, 21 Aug 2023 16:43:04 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/strange-character-appear-after-conversion-from-sas-dataset-to/m-p/890234#M351757</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2023-08-21T16:43:04Z</dc:date>
    </item>
  </channel>
</rss>

