<?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 doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725705#M225469</link>
    <description>&lt;P&gt;Looks to me like you pasted UTF-8 text into an editor that doesn't support UTF-8 code.&amp;nbsp; I am not surprised that the result is different.&lt;/P&gt;</description>
    <pubDate>Fri, 12 Mar 2021 03:47:18 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-03-12T03:47:18Z</dc:date>
    <item>
      <title>SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characters</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725527#M225377</link>
      <description>&lt;P&gt;Dear all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to understand and solve a problem I have with SAS, desktop version, 9.4&lt;/P&gt;&lt;P&gt;I accessing a Postgres database (db encoding is UTF-8) with SAS with Proc SQL through the ODBC engine. I use SAS in Unicode and the datafiles that are being created are in UTF-8 unicode format.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;One of the lines in the result set I get back show the white question mark in a black diamond shape instead of bullet points.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;This is the code&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname sql_read odbc dsn=datasource schema=schemaAB;

PROC SQL;
CREATE TABLE work.test (encoding='UTF-8') as
SELECT id, result
FROM sql_read.tableA 
where id = '123'
;
QUIT;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;The log is clean, it doesn't see anything about truncation&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;For trouble shooting I checked other tools to see what the result is there:&lt;/P&gt;&lt;P&gt;Python, and MS Access using the same Odbc data source as SAS and show the bullet points.&lt;/P&gt;&lt;P&gt;So I think this is something SAS specific, but I don't know what.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I tried to use several encoding settings I found but nothing helps.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Does anyone have an idea what this might be?&lt;/P&gt;&lt;P&gt;The bullet point in this case might just be one example, I have other tables that I just didn't check yet.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 17:09:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725527#M225377</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-11T17:09:45Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725537#M225382</link>
      <description>Have you tried using the option client_encoding='utf-8' in the libname?&lt;BR /&gt;See: &lt;A href="https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=acreldb&amp;amp;docsetTarget=n1q0m2sl5jsi7mn125qfkflg9hfl.htm&amp;amp;locale=en" target="_blank"&gt;https://documentation.sas.com/?cdcId=pgmsascdc&amp;amp;cdcVersion=9.4_3.5&amp;amp;docsetId=acreldb&amp;amp;docsetTarget=n1q0m2sl5jsi7mn125qfkflg9hfl.htm&amp;amp;locale=en&lt;/A&gt;</description>
      <pubDate>Thu, 11 Mar 2021 17:43:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725537#M225382</guid>
      <dc:creator>JosvanderVelden</dc:creator>
      <dc:date>2021-03-11T17:43:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725540#M225385</link>
      <description>&lt;P&gt;I did try that, but I get the following error:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;libname sql_read odbc dsn=datasource schema=schemaAB client_encoding='utf-8';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;ERROR: Libref SQL_READ is not assigned.&lt;BR /&gt;ERROR: Error in the LIBNAME statement.&lt;BR /&gt;ERROR 22-7: Invalid option name CLIENT_ENCODING.&lt;BR /&gt;&lt;BR /&gt;&lt;/P&gt;&lt;P&gt;I assume this is because I use the ODBC engine, not the Postgres engine. My SAS installation does not include the Postgres engine.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 17:52:23 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725540#M225385</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-11T17:52:23Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725555#M225389</link>
      <description>&lt;P&gt;What is your SAS session encoding? That will likely influence viewing the contents of a SAS dataset regardless of what encoding it is stored with.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 19:02:35 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725555#M225389</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-03-11T19:02:35Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725564#M225390</link>
      <description>&lt;PRE&gt;proc options option=encoding;
run;&lt;/PRE&gt;&lt;P&gt;shows:&lt;/P&gt;&lt;P&gt;SAS (r) Proprietary Software Release 9.4 TS1M5&lt;/P&gt;&lt;P&gt;ENCODING=UTF-8 Specifies the default character-set encoding for the SAS session.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 19:20:44 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725564#M225390</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-11T19:20:44Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725584#M225401</link>
      <description>&lt;P&gt;I also tried to manually create a data file with the string the has the bullet points that I see in MS Access or Python when I extract the same data as with the SAS Proc SQL statement:&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;data test2;
infile datalines delimiter='|';
informat id $20. result $200. ;
input id result ;
datalines;
123 | • TEST TEST TEST
;
run;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;This is what I see when I look at table test2:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2021-03-11_14-45-34.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55832i1B9DF51C66E8940F/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-11_14-45-34.png" alt="2021-03-11_14-45-34.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Compared to the file the Proc SQL statement is creating:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2021-03-11_14-52-05.png" style="width: 468px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55834i174F44A644A0FDC7/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-11_14-52-05.png" alt="2021-03-11_14-52-05.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So my SAS session can display the bullet point character, but when retrieving the data is doesn't get it, even though other programs that use the same ODBC data connection are displaying the bullet point.&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 19:59:34 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725584#M225401</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-11T19:59:34Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725600#M225408</link>
      <description>&lt;P&gt;Are you just talking about how it looks in the SAS Display Manager interface?&amp;nbsp; I don't think that interface is very UTF-8 compatible.&amp;nbsp; What does is look like you you write it to an RTF or HTML file using ODS?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 20:17:13 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725600#M225408</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-03-11T20:17:13Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725664#M225441</link>
      <description>&lt;P&gt;Thank you for this suggestion!&lt;/P&gt;&lt;P&gt;I did an ODS export to PDF of the data I get from the Postgres database and now I do see this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2021-03-11_17-13-01.png" style="width: 307px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55850iAD4C95E83EDCEE56/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-11_17-13-01.png" alt="2021-03-11_17-13-01.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So as you thought, the Display Manager is not showing it correctly.&lt;/P&gt;&lt;P&gt;But, as a next step I did run a proc compare between the file I downloaded and the one I manually created by pasting the value in there that I got with MS Access, and I see this:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="2021-03-11_17-22-06.png" style="width: 575px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55852i2746A2D120BDEC7B/image-size/large?v=v2&amp;amp;px=999" role="button" title="2021-03-11_17-22-06.png" alt="2021-03-11_17-22-06.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I would have expected now that the underlying value is the same. Is there anything I can do here?&lt;/P&gt;</description>
      <pubDate>Thu, 11 Mar 2021 22:31:15 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725664#M225441</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-11T22:31:15Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725690#M225457</link>
      <description>&lt;P&gt;Do you have Enterprise Guide or SAS Studio available? They are likely to be more UTF-8 aware than Display Manager.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 01:43:49 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725690#M225457</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-03-12T01:43:49Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725699#M225464</link>
      <description>&lt;P&gt;I just ran the same code in Enterprise Guide and did a proc compare.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-left" image-alt="mcdooyledoo_0-1615516354811.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/55854i22F62E08FB508A50/image-size/large?v=v2&amp;amp;px=999" role="button" title="mcdooyledoo_0-1615516354811.png" alt="mcdooyledoo_0-1615516354811.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So now I'm just surprised to see that EG and normal SAS handle UTF-8 data that differently in some cases.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for the suggestion.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 02:58:08 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725699#M225464</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-12T02:58:08Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725705#M225469</link>
      <description>&lt;P&gt;Looks to me like you pasted UTF-8 text into an editor that doesn't support UTF-8 code.&amp;nbsp; I am not surprised that the result is different.&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 03:47:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725705#M225469</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-03-12T03:47:18Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725783#M225512</link>
      <description>&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I copied text the UFT-8 character (the bullet point) into the SAS program code in SAS 9.4 to create a sample dataset that I compared with proc compare to the information that I download form the Postgres database. And I execute the same program one time in SAS 9.4 and after that in EG.&lt;/P&gt;&lt;P&gt;I use proc compare for both data sets:&amp;nbsp;&lt;/P&gt;&lt;UL&gt;&lt;LI&gt;SAS 9.4 shows a difference between the downloaded information and the sample data set.&lt;/LI&gt;&lt;LI&gt;EG doesn't show that difference, the information is the same.&lt;/LI&gt;&lt;/UL&gt;&lt;P&gt;SAS 9.4 displays the bullet point when I output the information with ODS to PDF but not in the Data Viewer or in Proc Compare.&lt;/P&gt;&lt;P&gt;EG shows the bullet point everywhere.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;So I find this behavior just strange but maybe I'm missing something here.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 13:19:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/725783#M225512</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-12T13:19:47Z</dc:date>
    </item>
    <item>
      <title>Re: SAS doesn't show some Unicode characters, data from UTF-8 Postgres. Other programs show characte</title>
      <link>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/726004#M225583</link>
      <description>&lt;P&gt;I tested more since yesterday and I realized that the reason I see different results in SAS 9.4 and EG is due to the fact that the session encoding in EG was set to wlatin1 instead of UTF-8.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I set the session encoding to wlatin1 in SAS 9.4 or EG I get better data quality than with utf-8, even though the Postgres shows this:&lt;/P&gt;&lt;P&gt;Server Encoding: UTF-8, Client Encoding: UNICODE&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I use SAS in wlatin1 characters like bullet points&amp;nbsp;• and&amp;nbsp;É are displayed correctly.&lt;/P&gt;&lt;P&gt;When I use SAS in UFT-8 I get in both cases this:&amp;nbsp;�&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I don't understand that.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 12 Mar 2021 22:29:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/SAS-doesn-t-show-some-Unicode-characters-data-from-UTF-8/m-p/726004#M225583</guid>
      <dc:creator>mcdooyledoo</dc:creator>
      <dc:date>2021-03-12T22:29:02Z</dc:date>
    </item>
  </channel>
</rss>

