[freetds] Non western language

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


Hello,

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
[TEST]
        host = 192.168.0.210
        port = 1433
        tds version = 8.0
        client charset = SJIS


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

# .odbc.ini
[TEST]
Driver          = TDS
Description             = test database
Trace           = No
Server          = 192.168.0.210
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.


regards,
Horacio





More information about the FreeTDS mailing list