<?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: SAS EG not supporting UTF-8 in code? in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878387#M347041</link>
    <description>&lt;P&gt;According to Wikipedia, BOM should not be necessary to recognise a file as UTF-8 but many programs need it regardless [1]:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;The Unicode Standard permits the BOM in &lt;A title="UTF-8" href="https://en.wikipedia.org/wiki/UTF-8" target="_blank" rel="noopener"&gt;UTF-8&lt;/A&gt;,&lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-4" target="_blank" rel="noopener"&gt;[4]&lt;/A&gt; but does not require or recommend its use. &lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-5" target="_blank" rel="noopener"&gt;[5]&lt;/A&gt;(...) &lt;A title="Microsoft" href="https://en.wikipedia.org/wiki/Microsoft" target="_blank" rel="noopener"&gt;Microsoft&lt;/A&gt; compilers&lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-11" target="_blank" rel="noopener"&gt;[11]&lt;/A&gt; and interpreters, and many pieces of software on &lt;A title="Microsoft Windows" href="https://en.wikipedia.org/wiki/Microsoft_Windows" target="_blank" rel="noopener"&gt;Microsoft Windows&lt;/A&gt; such as &lt;A title="Notepad (Windows)" href="https://en.wikipedia.org/wiki/Notepad_(Windows)" target="_blank" rel="noopener"&gt;Notepad&lt;/A&gt; (prior to Windows 10 Build 1903&lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-12" target="_blank" rel="noopener"&gt;[12]&lt;/A&gt;) treat the BOM as a required &lt;A title="Magic number (programming)" href="https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files" target="_blank" rel="noopener"&gt;magic number&lt;/A&gt; rather than use heuristics. These tools add a BOM when saving text as UTF-8, and cannot interpret UTF-8 unless the BOM is present or the file contains only ASCII&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Setting UTF-8-BOM as default would definitely be useful as otherwise one has to actively parse the code for symbols not representable as ASCII which is not very realistic. Moreover, the option to select encoding only appers when using File -&amp;gt; Save as or the respective button, but not when going via Properties -&amp;gt; Save as, which makes it super easy to miss.&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/Byte_order_mark&lt;/A&gt;&lt;/P&gt;</description>
    <pubDate>Wed, 31 May 2023 10:20:42 GMT</pubDate>
    <dc:creator>js5</dc:creator>
    <dc:date>2023-05-31T10:20:42Z</dc:date>
    <item>
      <title>SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/867257#M342510</link>
      <description>&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;our server is running SAS in UTF-8 and we use EG for development. I am facing issues putting ≤ symbol into proc format:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format;
	value $avisit
		"V0" = "V0 ≤28d pre"
		"V1PRE" = "V1 pre"
		"V2" = "V2 3+2d post"
		"V3" = "V3 7+2d post"
		"V4" = "V4 28±3d post"
		"V5" = "V5 3m±7d post"
		"V6" = "V6 6m±10d post";&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;If I save the file, ≤ gets converted to =. If I open the saved file with Notepad++, it says that the file is ANSI encoded. If I then change the encoding to UTF-8 and fix the file up, I get this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="formatutf8.png" style="width: 441px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/82195i36CF0922DEB8CE65/image-size/large?v=v2&amp;amp;px=999" role="button" title="formatutf8.png" alt="formatutf8.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;Can this be made to work? I guess I could read a text file and use ctnlin parameted but this seems rather excessive. Thank you for your feedback in advance.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 30 Mar 2023 14:29:06 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/867257#M342510</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2023-03-30T14:29:06Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/867263#M342512</link>
      <description>&lt;P&gt;I see the issue, and I don't know enough about changing encoding and if that would work.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I usually embed special characters in my formats with this kind of syntax. E.g., in this case the unicode value for a LE sign is 2264&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;proc format;
   value quantity 1 = 'Never'
             2 = "1(*ESC*){unicode '2264'x}5 visits"
             3 = "6(*ESC*){unicode '2264'x}10 visits"
;&lt;/CODE&gt;&lt;/PRE&gt;</description>
      <pubDate>Thu, 30 Mar 2023 14:47:43 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/867263#M342512</guid>
      <dc:creator>svh</dc:creator>
      <dc:date>2023-03-30T14:47:43Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878374#M347030</link>
      <description>&lt;P&gt;This works for ODS output but not if I wish to have unicode symbols in my datasets. I have reached out to SAS support regarding this as it seems quite misleading to claim to "support" unicode (which dates back to the 90s) while requiring the code itself to be plain ASCII. I am guessing I would have similar issues if I had to refer to either variables or values containing characters not representable by ASCII.&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 09:16:30 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878374#M347030</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2023-05-31T09:16:30Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878377#M347032</link>
      <description>&lt;P&gt;Before saving the file select proper encoding. In EG8 it looks like:&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="yabwon_0-1685525339176.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/84518i79514761865AF799/image-size/medium?v=v2&amp;amp;px=400" role="button" title="yabwon_0-1685525339176.png" alt="yabwon_0-1685525339176.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;For EG7 it looks a bit different but is there too.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 09:29:40 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878377#M347032</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-31T09:29:40Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878384#M347038</link>
      <description>&lt;P&gt;Thanks, it worked. When compared to the manually prepared unicode file is that SAS EG saves it with byte-order mark: UTF-8-BOM as opposed to UTF-8. Can the default encoding be changed?&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 09:47:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878384#M347038</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2023-05-31T09:47:26Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878385#M347039</link>
      <description>&lt;P&gt;True, it saves it as UTF-8-BOM and it looks like there is no UTF-8-NOBOM on the list.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I didn't find any option in the "Tools -&amp;gt; Options -&amp;gt;" menu to set default encoding... The only thing that pops-up in my head is that maybe there is a Windows registry key to edit for that. The fist person I would ask about such possibility is&amp;nbsp;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/4"&gt;@ChrisHemedinger&lt;/a&gt;. ( In general, Chris knows a lot about EG so he is a good point of contact &lt;span class="lia-unicode-emoji" title=":winking_face:"&gt;😉&lt;/span&gt; )&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Bart&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 10:02:28 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878385#M347039</guid>
      <dc:creator>yabwon</dc:creator>
      <dc:date>2023-05-31T10:02:28Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878387#M347041</link>
      <description>&lt;P&gt;According to Wikipedia, BOM should not be necessary to recognise a file as UTF-8 but many programs need it regardless [1]:&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;The Unicode Standard permits the BOM in &lt;A title="UTF-8" href="https://en.wikipedia.org/wiki/UTF-8" target="_blank" rel="noopener"&gt;UTF-8&lt;/A&gt;,&lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-4" target="_blank" rel="noopener"&gt;[4]&lt;/A&gt; but does not require or recommend its use. &lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-5" target="_blank" rel="noopener"&gt;[5]&lt;/A&gt;(...) &lt;A title="Microsoft" href="https://en.wikipedia.org/wiki/Microsoft" target="_blank" rel="noopener"&gt;Microsoft&lt;/A&gt; compilers&lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-11" target="_blank" rel="noopener"&gt;[11]&lt;/A&gt; and interpreters, and many pieces of software on &lt;A title="Microsoft Windows" href="https://en.wikipedia.org/wiki/Microsoft_Windows" target="_blank" rel="noopener"&gt;Microsoft Windows&lt;/A&gt; such as &lt;A title="Notepad (Windows)" href="https://en.wikipedia.org/wiki/Notepad_(Windows)" target="_blank" rel="noopener"&gt;Notepad&lt;/A&gt; (prior to Windows 10 Build 1903&lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark#cite_note-12" target="_blank" rel="noopener"&gt;[12]&lt;/A&gt;) treat the BOM as a required &lt;A title="Magic number (programming)" href="https://en.wikipedia.org/wiki/Magic_number_(programming)#Magic_numbers_in_files" target="_blank" rel="noopener"&gt;magic number&lt;/A&gt; rather than use heuristics. These tools add a BOM when saving text as UTF-8, and cannot interpret UTF-8 unless the BOM is present or the file contains only ASCII&lt;BR /&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;Setting UTF-8-BOM as default would definitely be useful as otherwise one has to actively parse the code for symbols not representable as ASCII which is not very realistic. Moreover, the option to select encoding only appers when using File -&amp;gt; Save as or the respective button, but not when going via Properties -&amp;gt; Save as, which makes it super easy to miss.&lt;/P&gt;&lt;P&gt;[1] &lt;A href="https://en.wikipedia.org/wiki/Byte_order_mark" target="_blank" rel="noopener"&gt;https://en.wikipedia.org/wiki/Byte_order_mark&lt;/A&gt;&lt;/P&gt;</description>
      <pubDate>Wed, 31 May 2023 10:20:42 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878387#M347041</guid>
      <dc:creator>js5</dc:creator>
      <dc:date>2023-05-31T10:20:42Z</dc:date>
    </item>
    <item>
      <title>Re: SAS EG not supporting UTF-8 in code?</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878408#M347049</link>
      <description>&lt;P&gt;Copying this from another related discussion -- in general it's better to detect UTF-8 by examining contents and not relying on BOM. But some systems might still rely on it.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;BLOCKQUOTE&gt;
&lt;DIV&gt;"Use of a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="highlight"&gt;BOM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is neither required nor recommended for UTF-8, but may be encountered in contexts where UTF-8 data is converted from other encoding forms that use a&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="highlight"&gt;BOM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;or where the&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;SPAN class="highlight"&gt;BOM&lt;/SPAN&gt;&lt;SPAN&gt;&amp;nbsp;&lt;/SPAN&gt;is used as a UTF-8 signature"&lt;/DIV&gt;
&lt;DIV&gt;&lt;A href="https://www.unicode.org/versions/Unicode6.0.0/ch02.pdf" target="_blank" rel="nofollow noopener noreferrer"&gt;https://www.unicode.org/versions/Unicode6.0.0/ch02.pdf&lt;/A&gt;&lt;/DIV&gt;
&lt;/BLOCKQUOTE&gt;</description>
      <pubDate>Wed, 31 May 2023 13:16:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-EG-not-supporting-UTF-8-in-code/m-p/878408#M347049</guid>
      <dc:creator>ChrisHemedinger</dc:creator>
      <dc:date>2023-05-31T13:16:45Z</dc:date>
    </item>
  </channel>
</rss>

