<?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: Characters turned into Chinese using sql insert from Viya in SAS Viya</title>
    <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739416#M924</link>
    <description>&lt;P&gt;The conection is through ODBC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;libname mssql odbc dsn="dsn" schema=schema user="user" password="pw"&lt;BR /&gt;cursor_type=forward_only;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from the odbc.ini:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[dsn]&lt;/P&gt;&lt;P&gt;Driver = ODBC Driver 17 for SQL Server&lt;/P&gt;&lt;P&gt;Server = servername&lt;/P&gt;&lt;P&gt;Database=database&lt;/P&gt;&lt;P&gt;AutoTranslate=yes&lt;/P&gt;&lt;P&gt;IANAAppCodePage=106&lt;/P&gt;&lt;P&gt;DriverUnicodeType=1&lt;/P&gt;</description>
    <pubDate>Thu, 06 May 2021 07:45:07 GMT</pubDate>
    <dc:creator>Ullsokk</dc:creator>
    <dc:date>2021-05-06T07:45:07Z</dc:date>
    <item>
      <title>Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739192#M919</link>
      <description>&lt;P&gt;I am trying to update a table in a sql database from viya, using proc sql insert. However, the characters have turned into Chinese on the way from VIYA to the sql database.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this a known issue? I would guess this has something to do with encoding.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The same code works from SAS 9.4.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Wed, 05 May 2021 12:10:01 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739192#M919</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2021-05-05T12:10:01Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739377#M920</link>
      <description>&lt;P&gt;Hi,&lt;/P&gt;
&lt;P&gt;First, please clarify the environment.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;1. The encoding of SAS and the encoding of the original database in the environment where you checked it works.&lt;/P&gt;
&lt;P&gt;2. what is the execution environment when garbled on Viya, SAS or other?&lt;/P&gt;
&lt;P&gt;3. How were the databases created? Is it just a SAS dataset, a sql database, did you create it, is it an existing database, etc.?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 00:37:26 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739377#M920</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-05-06T00:37:26Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739407#M922</link>
      <description>&lt;P&gt;1.The encoding in sas VIYA is UTF-8, as far as I am aware. The encoding in the MSSQL database is wlatin1, the same is true in our 9.4 environmen, where the code works.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2.The execution was from sas studio V&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;3.The database is an existing MSSQL database&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 07:02:57 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739407#M922</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2021-05-06T07:02:57Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739412#M923</link>
      <description>&lt;P&gt;Let me check something additional.&lt;/P&gt;
&lt;P&gt;How are you connecting to the mssql database?&lt;BR /&gt;Is it sqlsvr with the access engine, or ODBC? Or is it some other way?&lt;BR /&gt;Also, what is the code for the part that is connecting to the database?&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 07:37:16 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739412#M923</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-05-06T07:37:16Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739416#M924</link>
      <description>&lt;P&gt;The conection is through ODBC&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;libname mssql odbc dsn="dsn" schema=schema user="user" password="pw"&lt;BR /&gt;cursor_type=forward_only;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;from the odbc.ini:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;[dsn]&lt;/P&gt;&lt;P&gt;Driver = ODBC Driver 17 for SQL Server&lt;/P&gt;&lt;P&gt;Server = servername&lt;/P&gt;&lt;P&gt;Database=database&lt;/P&gt;&lt;P&gt;AutoTranslate=yes&lt;/P&gt;&lt;P&gt;IANAAppCodePage=106&lt;/P&gt;&lt;P&gt;DriverUnicodeType=1&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 07:45:07 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739416#M924</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2021-05-06T07:45:07Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739421#M925</link>
      <description>&lt;P&gt;Try adding the following string to the end of the libname statement.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;client_encoding='utf-8'&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 07:56:36 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739421#M925</guid>
      <dc:creator>japelin</dc:creator>
      <dc:date>2021-05-06T07:56:36Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739423#M926</link>
      <description>&lt;P&gt;Tried it, in several locations in the libname statement. got the following error:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;ERROR 22-7: Invalid option name CLIENT_ENCODING.&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 08:02:38 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739423#M926</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2021-05-06T08:02:38Z</dc:date>
    </item>
    <item>
      <title>Re: Characters turned into Chinese using sql insert from Viya</title>
      <link>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739424#M927</link>
      <description>&lt;P&gt;tried the option for a postgres example:&amp;nbsp;&lt;/P&gt;&lt;PRE class="xisDoc-codeFragmentLast"&gt;&lt;CODE&gt;libname mydb postgres server=myserver port=5432 
    user=myuser password='mypwd' database=mydb1 client_encoding='utf-8';&lt;/CODE&gt;&lt;/PRE&gt;&lt;P&gt;that gave no error regarding client_encoding. Is client_encoding maybe not supported in odbc?&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 06 May 2021 08:07:02 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Viya/Characters-turned-into-Chinese-using-sql-insert-from-Viya/m-p/739424#M927</guid>
      <dc:creator>Ullsokk</dc:creator>
      <dc:date>2021-05-06T08:07:02Z</dc:date>
    </item>
  </channel>
</rss>

