<?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: Issue of transcoding in utf-8 in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844108#M41699</link>
    <description>&lt;P&gt;Did you check that the definition of the ODBC connection you are calling&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;VMBRPGPROD&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is this same on both machines?&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Mon, 14 Nov 2022 13:55:31 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2022-11-14T13:55:31Z</dc:date>
    <item>
      <title>Issue of transcoding in utf-8</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844107#M41698</link>
      <description>&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;I have a strange issue here between 2 workstations with exactly the same SAS version (9.4), the same encoding (utf-8), the same LOCALE (EN_US), the same OS (win10) and the same postgres ODBC Version:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;when I run this script below, it works for one machine but not for the other:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=""&gt;%let _studypath=L:\sas_view\Rave\Imp\prod;


Libname ext "&amp;amp;_studypath\data\external" ;

PROC SQL;
connect to odbc as odbc(datasrc="VMBRPGPROD");

create view ext.v_site_list as select
SITE label="site" format $30.
,INV_LASTNAME label="Investigator lastname" format $30. length=30
,INV_FIRSTNAME label="Investigator firstname" format $30. length=30
,EMAIL label="Email" format $50.
,ADDRESS label="Address" format $255.
,CITY label="City" format $30.
,POSTAL_CODE label="Postal_code" format $10.
,COUNTRY label="Country" format $30.
,PHONE label="Phone" format $30.
from connection to odbc (
select
center_number as site
,convert_to(lastname,'UTF8') as inv_lastname
,convert_to(firstname,'UTF8') as inv_firstname
,convert_to(email,'UTF8') as email
,convert_to(address,'UTF8') as address
,convert_to(city,'UTF8') as city
,convert_to(postal_code,'UTF8') as postal_code
,country as country
,convert_to(phone,'UTF8') as phone
from contacts.v_imp_sites_pi);


disconnect from odbc ;

quit ;

proc contents data=ext.v_site_list; run;
quit ;&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;BR /&gt;The CONTENTS Procedure&lt;BR /&gt;Data Set Name EXT.V_SITE_LIST Observations .&lt;BR /&gt;Member Type VIEW Variables 9&lt;BR /&gt;Engine SQLVIEW Indexes 0&lt;BR /&gt;Created 11/14/2022 12:45:30 Observation Length 1395&lt;BR /&gt;Last Modified 11/14/2022 12:45:30 Deleted Observations 0&lt;BR /&gt;Protection Compressed NO&lt;BR /&gt;Data Set Type Sorted NO&lt;BR /&gt;Label&lt;BR /&gt;Data Representation Default&lt;BR /&gt;Encoding Default&lt;BR /&gt;Alphabetic List of Variables and Attributes&lt;BR /&gt;# Variable Type Len Flags Format Informat Label&lt;BR /&gt;5 ADDRESS Char 255 P-- $255. $HEX510. Address&lt;BR /&gt;6 CITY Char 255 P-- $30. $HEX510. City&lt;BR /&gt;8 COUNTRY Char 30 P-- $30. $30. Country&lt;BR /&gt;4 EMAIL Char 255 P-- $50. $HEX510. Email&lt;BR /&gt;3 INV_FIRSTNAME Char 30 P-- $30. $HEX510. Investigator firstname&lt;BR /&gt;2 INV_LASTNAME Char 30 P-- $30. $HEX510. Investigator lastname&lt;BR /&gt;9 PHONE Char 255 P-- $30. $HEX510. Phone&lt;BR /&gt;7 POSTAL_CODE Char 255 P-- $10. $HEX510. Postal_code&lt;BR /&gt;1 SITE Char 30 P-- $30. $30. site&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;On the other computer, I have this result when I run the proc content of the same view:&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Alphabetic List of Variables and Attributes&lt;BR /&gt;# Variable Type Len Flags Format Informat Label&lt;BR /&gt;5 ADDRESS Char 1 P-- $255. $HEX2. Address&lt;BR /&gt;6 CITY Char 1 P-- $30. $HEX2. City&lt;BR /&gt;8 COUNTRY Char 30 P-- $30. $30. Country&lt;BR /&gt;4 EMAIL Char 1 P-- $50. $HEX2. Email&lt;BR /&gt;3 INV_FIRSTNAME Char 30 P-- $30. $HEX2. Investigator firstname&lt;BR /&gt;2 INV_LASTNAME Char 30 P-- $30. $HEX2. Investigator lastname&lt;BR /&gt;9 PHONE Char 1 P-- $30. $HEX2. Phone&lt;BR /&gt;7 POSTAL_CODE Char 1 P-- $10. $HEX2. Postal_code&lt;BR /&gt;1 SITE Char 30 P-- $30. $30. site&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;&lt;STRONG&gt;And when I run the script for creating the view, I have a failure of transcoding from utf-8 to utf-16le.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;I don't understand why I don't have the same behavior and the same reading of the same view between the 2 workstations.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;However, when I run the script with LATIN1 for encoding, it works on the second machine.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 13:50:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844107#M41698</guid>
      <dc:creator>jacques</dc:creator>
      <dc:date>2022-11-14T13:50:18Z</dc:date>
    </item>
    <item>
      <title>Re: Issue of transcoding in utf-8</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844108#M41699</link>
      <description>&lt;P&gt;Did you check that the definition of the ODBC connection you are calling&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=""&gt;VMBRPGPROD&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;is this same on both machines?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 14 Nov 2022 13:55:31 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844108#M41699</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2022-11-14T13:55:31Z</dc:date>
    </item>
    <item>
      <title>Re: Issue of transcoding in utf-8</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844295#M41700</link>
      <description>yes, they are exactly the same: same driver version (PostgreSQL Unicode(x64) 13.02)</description>
      <pubDate>Tue, 15 Nov 2022 08:06:18 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/Issue-of-transcoding-in-utf-8/m-p/844295#M41700</guid>
      <dc:creator>jacques</dc:creator>
      <dc:date>2022-11-15T08:06:18Z</dc:date>
    </item>
  </channel>
</rss>

