[freetds] Non western language

Horacio Sanson horacio at skillupjapan.co.jp
Thu Nov 10 23:01:07 EST 2005


I have been working with FreeTDS/unixODBC on a linux machine connecting to a 
MS SQL 2000 database. All my varchar fields are in japanese and I can 
update/insert records with japanese characters with no problem. Using the SQL 
Query Analyser on windows shows the japanese text correctly.

The problem is that I cannot select records from the server as all text data 
gets converted to "?" chars. I changed the configuration in all ways I could 
think of using diferent char encodings with no luck. Can someone help me find 
a way to read japanese text/varchar fields from the database??

Here is my configuration:

# freetds.conf
        host =
        port = 1433
        tds version = 8.0
        client charset = SJIS

# odbcinst.ini
Description             = v0.52 with protocol v4.2
Driver          = /usr/lib/libtdsodbc.so
UsageCount              = 1

# .odbc.ini
Driver          = TDS
Description             = test database
Trace           = No
Server          =
Database                = TEST

I connect using isql and my system is set to Shift_JIS encoding. I can send 
data to the SQL server and it is stored ok at the server but I cannot later 
retrieve it.

I tried several charsets like UTF-8, Shift-JIS, EUC-JP etc and all of them 
give me "?" chars instead of the japanese characters.


More information about the FreeTDS mailing list