[freetds] How to set tsql's client character set

KJ kjatwork at gmx.net
Wed Aug 9 05:44:49 EDT 2006


Hi all,

I just successfully compiled and installed freetds 0.64 on cygwin.
I'm able to get a connection to Sybase ASE as well as to MS SQL Server.
However I can't figure out how to tell the client (e.g. tsql) to use use
a specific character set. Sybase ASE's character set is iso_1 and I
tried to connect to Sybase using differnet character set specifications,
e.g ISO-8859-1, iso_1. But no matter which character set I'm specifying,
tsql always connects with iso646. As far as I can see, I compiled tsql
with the GNU iconv library. Hence all the supported character set
conversion should be available.
Does someone know how to specify the character set?

TIA
KJ

tsql -C provides

Compile-time settings (established with the "configure" script):
                           Version: freetds v0.64
    MS db-lib source compatibility: no
       Sybase binary compatibility: unknown
                     Thread safety: yes
                     iconv library: yes
                       TDS version: 5.0
                             iODBC: no
                          unixodbc: no

Running tsql I get

locale is "C"
locale charset is "US-ASCII"
Password:
Msg 2401, Level 11, State 2, Server ASE125, Line 0
Character set conversion is not available between client character set
'iso646' and server character set 'iso_1'.

Msg 2411, Level 10, State 1, Server ASE125, Line 0
No conversions will be done.

Msg 5704, Level 10, State 2, Server ASE125, Line 0
Changed client character set setting to '<NULL>'.

TDSDUMPCONFIG file
util.c:288:Starting log file for FreeTDS 0.64
    on 2006-08-01 10:42:40 with debug flags 0x4fff.
config.c:158:Attempting to read conf files.
config.c:202:Found conf file '~/.freetds.conf' set programmatically.
Reading section 'ASE125'.
config.c:333:Looking for section global.
config.c:390:... Found section sqlserver2000.
config.c:390:... Found section sqlserver2005.
config.c:390:... Found section ase125.
config.c:333:Looking for section ASE125.
config.c:390:... Found section sqlserver2000.
config.c:390:... Found section sqlserver2005.
config.c:390:... Found section ase125.
config.c:393:Got a match.
config.c:413:option = 'host' value = 'sybase'.
config.c:440:Found host entry sybase.
config.c:443:IP addr is 193.16.164.25.
config.c:413:option = 'port' value = '3024'.
config.c:413:option = 'tds version' value = '5.0'.
config.c:413:option = 'client charset' value = 'ISO-8859-1'.
config.c:457:tds_config_login: client charset is ISO-8859-1.
config.c:413:option = 'debug level' value = '99'.
config.c:465:UNRECOGNIZED option 'debug level'...ignoring.
config.c:206:...Success.
config.c:578:Setting 'dump_file' to 'freetds.log' from $TDSDUMP.
config.c:487:tds_config_login: client_charset is US-ASCII.

TDSDUMP file

util.c:288:Starting log file for FreeTDS 0.64
    on 2006-08-01 10:42:40 with debug flags 0x4fff.
iconv.c:195:names for ISO-8859-1: ISO-8859-1
iconv.c:195:names for UTF-8: UTF-8
iconv.c:195:names for UCS-2LE: UCS-2LE
iconv.c:195:names for UCS-2BE: UCS-2BE
iconv.c:361:iconv to convert client-side data to the "US-ASCII"
character set
iconv.c:514:tds_iconv_info_init: converting "US-ASCII"->"UCS-2LE"
net.c:168:Connecting to 193.16.164.25 port 3024.
net.c:673:Sending packet
-- 


"Feel free" – 10 GB Mailbox, 100 FreeSMS/Monat ...
Jetzt GMX TopMail testen: http://www.gmx.net/de/go/topmail



More information about the FreeTDS mailing list