[freetds] Encoding UTF-8 / Umlauts

Christoph Kautz kautzy at solution-x.com
Thu Nov 19 04:43:06 EST 2009


Hello list! ;-)

I'm trying to write&read data with php to/from a microsoft sqlserver 2008 but I am running into character conversion problems with Umlauts and Cyrillic letters.

I have tried different freetds configs but there is always one case which does not work. on one of the my servers I have installed freetds 0.82. if I put the server entry in freetds.conf like this:

[mssql.server]
        host = mssql.server
        port = 1433
        tds version = 8.0
        client charset = UTF-8

I can write/read umlauts(äöü) to/from the db and they are displayed correctly. But Cyrillic or greek letters are not stored/displayed correctly.

If I don't specify a client charset:

[mssql.server]
        host = mssql.server
        port = 1433
        tds version = 8.0

umlauts, cyrillic, greek letters are displayd as question marks.

I have tried to reproduce the same config on an old debian sarge server with freetds 0.61 installed and on this server everything is working fine - I can read/store äöü + Cyrillic and greek letters from/to the same database as used above.

Could someone give me a hint how I could make the behavior of the server with current freetds libraries match the server with the old ones? :)

Help would be very much appreciated!

Regards,

chris



More information about the FreeTDS mailing list