<?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: ERROR: character with byte sequence 0x98 in encoding &amp;quot;WIN1251&amp;quot; has no equivalent in en in SAS Data Management</title>
    <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726869#M19862</link>
    <description>&lt;P&gt;That seems strange as SAS knows how to translate that character to UTF-8.&amp;nbsp; &amp;nbsp;perhaps there is some truncation of the translated string going on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;303   data _null_;
304    length x y $10 ;
305    x='98'x ;
306    y=kcvt(x,'WIN1251','UTF-8');
307    put (x y) (= :$quote.) ;
308    put (x y) (= :$hex4.) ;
309   run;

x="˜" y="Â˜"
x=9820 y=C298
&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1615921092782.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56029i9184EF5A01D849B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1615921092782.png" alt="Tom_0-1615921092782.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Tue, 16 Mar 2021 18:58:21 GMT</pubDate>
    <dc:creator>Tom</dc:creator>
    <dc:date>2021-03-16T18:58:21Z</dc:date>
    <item>
      <title>ERROR: character with byte sequence 0x98 in encoding "WIN1251" has no equivalent in encoding "UTF8</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726855#M19861</link>
      <description>&lt;P&gt;Hello everyone,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've been tasked with registering a SAP table and pushing that table into Postgres within DI studio. I've registered the SAP table into SAS and once I try to create the table for Postgres it gives me the following error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: CLI execute error: ERROR: character with byte sequence 0x98 in encoding "WIN1251" has no equivalent in encoding "UTF8"; Error while executing the query.&amp;nbsp;&lt;/STRONG&gt;I've also tried to use user-written code but it still gives out the same error. I'm still fairly new with SAS DI studio and writing tables into databases, I've included the preserve_col_name= option in the libname statement as well as the quote= option in the proc SQL statement. I noticed that the error might be coming from the column label, is there a way to get ride of that error.&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;945        proc sql dquote=ansi
946        ;
947        create table pg_ecc."ausp"n as
948        select
949           ausp."MANDT"n length = 8
950              format = 3.
951              label = 'Client',
952           ausp."OBJEK"n length = 150
953              format = $150.
954              label = 'Key of object to be classified',
955           ausp."ATINN"n length = 10
956              format = $10.
957              label = 'Internal characteristic',
958           ausp."ATZHL"n length = 3
959              format = $3.
960              label = 'Characteristic value counter',
961           ausp."MAFID"n length = 3
962              format = $3.
963              label = 'Indicator: Object/Class',
964           ausp."KLART"n length = 9
965              format = $9.
966              label = 'Class Type',
967           ausp."ADZHL"n length = 4
968              format = $4.
969              label = 'Internal Counter for Archiving Objects by ECM',
970           ausp."ATWRT"n length = 90
971              format = $90.
972              label = 'Characteristic Value',
973           ausp."ATFLV"n length = 8
974              format = BEST12.
975              label = 'Internal floating point from',
976           ausp."ATAWE"n length = 9
977              format = $9.
978              label = 'Unit of Measurement',
979           ausp."ATFLB"n length = 8
980              format = BEST12.
981              label = 'Internal floating point value to',
982           ausp."ATAW1"n length = 9
983              format = $9.
984              label = 'Unit of Measurement',
985           ausp."ATCOD"n length = 3
986              format = $3.
987              label = 'Code for value dependency',
988           ausp."ATTLV"n length = 8
989              format = BEST12.
990              label = 'Tolerance from',
991           ausp."ATTLB"n length = 8
992              format = BEST12.
993              label = 'Tolerance to',
994           ausp."ATPRZ"n length = 3
37                                                         The SAS System                          Tuesday 16 March 2021 05:40:00 PM

995              format = $3.
996              label = 'Indicator: Tolerance Shown as a Percentage',
997           ausp."ATINC"n length = 8
998              format = BEST12.
999              label = 'Increment Within a Specified Interval',
1000          ausp."ATAUT"n length = 3
1001             format = $3.
1002             label = 'Classification: Author',
1003          ausp."AENNR"n length = 36
1004             format = $36.
1005             label = 'Change Number',
1006          ausp."DATUV"n length = 8
1007             format = DATE9.
1008             label = 'Valid-From Date',
1009          ausp."LKENZ"n length = 3
1010             format = $3.
1011             label = 'Deletion Indicator',
1012          ausp."ATIMB"n length = 10
1013             format = $10.
1014             label = 'Characteristic Number of User-Defined Data Type',
1015          ausp."ATZIS"n length = 3
1016             format = $3.
1017             label = 'Instance counter',
1018          ausp."ATSRT"n length = 4
1019             format = $4.
1020             label = 'Sort field for AUSP char. values',
1021          ausp."ATVGLART"n length = 3
1022             format = $3.
1023             label = 'Comparison Type for Char. Value: " " .. "7": Incl./Excl.',
1024          ausp."DATUB"n length = 8
1025             format = DATE9.
1026             label = 'Valid-to date'
1027       from
1028          work."ausp"n as ausp
1029       ;
NOTE: The DBIDIRECTEXEC option is not supported for this engine.
NOTE: SAS variable labels, formats, and lengths are not written to DBMS tables.
ERROR: CLI execute error: ERROR: character with byte sequence 0x98 in encoding "WIN1251" has no equivalent in encoding 
       "UTF8";
WARNING: File deletion failed for PG_ECC.AUSP.DATA.

NOTE: PROC SQL set option NOEXEC and will continue to check the syntax of statements.
1030       quit;
NOTE: The SAS System stopped processing this step because of errors.&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've included the proc SQL log details, your help will be greatly appreciated.&lt;/P&gt;&lt;P&gt;Gweek.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 18:22:45 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726855#M19861</guid>
      <dc:creator>Gweeks</dc:creator>
      <dc:date>2021-03-16T18:22:45Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: character with byte sequence 0x98 in encoding "WIN1251" has no equivalent in en</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726869#M19862</link>
      <description>&lt;P&gt;That seems strange as SAS knows how to translate that character to UTF-8.&amp;nbsp; &amp;nbsp;perhaps there is some truncation of the translated string going on?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;PRE&gt;303   data _null_;
304    length x y $10 ;
305    x='98'x ;
306    y=kcvt(x,'WIN1251','UTF-8');
307    put (x y) (= :$quote.) ;
308    put (x y) (= :$hex4.) ;
309   run;

x="˜" y="Â˜"
x=9820 y=C298
&lt;/PRE&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Tom_0-1615921092782.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/56029i9184EF5A01D849B2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Tom_0-1615921092782.png" alt="Tom_0-1615921092782.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 18:58:21 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726869#M19862</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-03-16T18:58:21Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: character with byte sequence 0x98 in encoding "WIN1251" has no equivalent in en</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726880#M19863</link>
      <description>&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/159"&gt;@Tom&lt;/a&gt;&amp;nbsp; does the code you've shared show the truncated bits in the translated string and is there a way to go about fixing that error.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 19:29:41 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726880#M19863</guid>
      <dc:creator>Gweeks</dc:creator>
      <dc:date>2021-03-16T19:29:41Z</dc:date>
    </item>
    <item>
      <title>Re: ERROR: character with byte sequence 0x98 in encoding "WIN1251" has no equivalent in en</title>
      <link>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726945#M19864</link>
      <description>&lt;P&gt;Check what encoding your SAS session is using.&lt;/P&gt;
&lt;P&gt;It will probably work better to run SAS using UTF-8, but that might depend on your Postgres settings.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Note that labels are not going to be written into the foreign database so going to the trouble of trying to define them in your code is a waste of time for that destination.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;You might try determining which observation and which variable is the one that is actually triggering the error.&amp;nbsp; Should not be that hard using a simple binary search strategy.&amp;nbsp; First eliminate half the variables and if that works then the variable is one in the other half.&amp;nbsp; Repeat until you figure out which variable.&amp;nbsp; Same for observations.&amp;nbsp; Try loading the first half of the observations if that works the problem is in something in the second half.&lt;/P&gt;</description>
      <pubDate>Tue, 16 Mar 2021 23:53:54 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Data-Management/ERROR-character-with-byte-sequence-0x98-in-encoding-quot-WIN1251/m-p/726945#M19864</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-03-16T23:53:54Z</dc:date>
    </item>
  </channel>
</rss>

