Quantcast
Channel: SQL Server Setup & Upgrade forum
Viewing all articles
Browse latest Browse all 7696

SQL 2017 on Linux - ODBC driver doesn't work with accent chars when using collation LATIN1_General_BIN

$
0
0

Hi, I'm using SQLServer 2017 on RHEL and everything looks fine but characters codepage. 
I've created a database using collation LATIN1_General_BIN and a table using VARCHAR datatype. 
I've noticed that some characters are stored with "?" (question mark) instead of the original accented chars (due to my codepage is CP1252) like ã, ç, Ã, Õ, Ç, etc. 
I've configured Linux ODBC Driver as follows:

[mydatabase]
Driver=/opt/microsoft/msodbcsql17/lib64/libmsodbcsql-17.2.so.0.1
Server=<myserverIP>
Port=<sqlPort>
User=<dbUser>
Password=<dbUserpwd>
Database=<mydatabase>

When my app inserts data on that table no error messages are returned. It just got "?" instead of accented chars.
So, I've tried another approach: instead of using Linux ODBC Driver I tried to use Windows ODBC Driver to connect to my SQLServer 2017 Linux database. I've created another database using the same collation used before and configured a conventional Windows ODBC Data Source to connect to it. This time when my app uses this Windows ODBC Data Source, the new table accepts the accented chars as expected. 

Does anyone knows what I'm doing wrong? I guess I need to setup the Linux ODBC Driver properly, but I really do not know how. Any tip would be appreciated.


Viewing all articles
Browse latest Browse all 7696

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>