<?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: How to do I solve ERROR: invalid byte sequence for encoding &amp;quot;UTF8&amp;quot;: 0x81 in SAS Programming</title>
    <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742825#M232438</link>
    <description>&lt;P&gt;'81'x is a byte that must only appear as a continuation byte in UTF-8. Even in Windows 1252, it is not used.&lt;/P&gt;
&lt;P&gt;I suggest you inspect your data to see where it appears. It might be you have binary coded values (e.g. a UUID stored in 16 bytes) that need to be translated with a DBSASTYPE option.&lt;/P&gt;</description>
    <pubDate>Fri, 21 May 2021 05:13:17 GMT</pubDate>
    <dc:creator>Kurt_Bremser</dc:creator>
    <dc:date>2021-05-21T05:13:17Z</dc:date>
    <item>
      <title>How to do I solve ERROR: invalid byte sequence for encoding "UTF8": 0x81</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742662#M232353</link>
      <description>&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I'm trying to write to a postgres database and I am getting the following error:&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;ERROR: CLI execute error: ERROR: invalid byte sequence for encoding "UTF8": 0x81; Error while executing the query.&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've added the PRESERVE_COL_NAMES options to my libname statement as well as the dquote option to my proc sql statement and I'm still getting the error.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help suggest other options to use.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I've included the&amp;nbsp; proc sql code I used as well as the error message received.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thank you for all your help.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc sql dquote=ansi;
 create table pg_rep.activation_Rate_base as
 select * 
 from Factor_Base;
quit;

&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gweeks_0-1621520537614.png" style="width: 999px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59608i18D1AE8000BC24AE/image-size/large?v=v2&amp;amp;px=999" role="button" title="Gweeks_0-1621520537614.png" alt="Gweeks_0-1621520537614.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;a href="https://communities.sas.com/t5/user/viewprofilepage/user-id/8"&gt;@Community_Help&lt;/a&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 14:23:10 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742662#M232353</guid>
      <dc:creator>Gweeks</dc:creator>
      <dc:date>2021-05-20T14:23:10Z</dc:date>
    </item>
    <item>
      <title>Re: How to do I solve ERROR: invalid byte sequence for encoding "UTF8": 0x81</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742790#M232424</link>
      <description>&lt;P&gt;Check your SAS session encoding using PROC OPTIONS:&lt;/P&gt;
&lt;PRE&gt;&lt;CODE class=" language-sas"&gt;proc options option = encoding;
run;&lt;/CODE&gt;&lt;/PRE&gt;
&lt;P&gt;If it is different to UTF8 then this could be the cause of your error.&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 21:01:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742790#M232424</guid>
      <dc:creator>SASKiwi</dc:creator>
      <dc:date>2021-05-20T21:01:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to do I solve ERROR: invalid byte sequence for encoding "UTF8": 0x81</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742801#M232428</link>
      <description>&lt;P&gt;The encoding of the SAS session is UTF-8.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Gweeks_0-1621548876997.png" style="width: 400px;"&gt;&lt;img src="https://communities.sas.com/t5/image/serverpage/image-id/59642iC5D2FC543B10FB99/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Gweeks_0-1621548876997.png" alt="Gweeks_0-1621548876997.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 20 May 2021 22:24:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742801#M232428</guid>
      <dc:creator>Gweeks</dc:creator>
      <dc:date>2021-05-20T22:24:46Z</dc:date>
    </item>
    <item>
      <title>Re: How to do I solve ERROR: invalid byte sequence for encoding "UTF8": 0x81</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742808#M232432</link>
      <description>&lt;P&gt;What is the definition of the&amp;nbsp;pg_rep libref?&lt;/P&gt;
&lt;P&gt;Is it using SAS base engine?&lt;BR /&gt;Some external database?&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 00:39:48 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742808#M232432</guid>
      <dc:creator>Tom</dc:creator>
      <dc:date>2021-05-21T00:39:48Z</dc:date>
    </item>
    <item>
      <title>Re: How to do I solve ERROR: invalid byte sequence for encoding "UTF8": 0x81</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742825#M232438</link>
      <description>&lt;P&gt;'81'x is a byte that must only appear as a continuation byte in UTF-8. Even in Windows 1252, it is not used.&lt;/P&gt;
&lt;P&gt;I suggest you inspect your data to see where it appears. It might be you have binary coded values (e.g. a UUID stored in 16 bytes) that need to be translated with a DBSASTYPE option.&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 05:13:17 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742825#M232438</guid>
      <dc:creator>Kurt_Bremser</dc:creator>
      <dc:date>2021-05-21T05:13:17Z</dc:date>
    </item>
    <item>
      <title>Re: How to do I solve ERROR: invalid byte sequence for encoding "UTF8": 0x81</title>
      <link>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742828#M232441</link>
      <description>&lt;P&gt;It is an external database, PostgresSQl database&lt;/P&gt;</description>
      <pubDate>Fri, 21 May 2021 05:53:47 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Programming/How-to-do-I-solve-ERROR-invalid-byte-sequence-for-encoding-quot/m-p/742828#M232441</guid>
      <dc:creator>Gweeks</dc:creator>
      <dc:date>2021-05-21T05:53:47Z</dc:date>
    </item>
  </channel>
</rss>

