Skip to Content.
Sympa Menu

freetds - [freetds] charset, mssql

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS <freetds AT lists.ibiblio.org>
  • Subject: [freetds] charset, mssql
  • Date: 29 Apr 2003 20:36:55 +0200

Current CVS do not work with TDS8 (mssql2k protocol).
If you want to try FreeTDS snapshot use TDS7 even for mssql2k.
Problem is due to conversion stuff. During login TDS8 server send
default collation for database using env type 7. This collation is
readed and used to setup iconv according (using collation charset)
however all next conversation use still ucs2...
TDS7 do not have this problem cause return collation information in a
different way (not still supported by FreeTDS, env types 5 and 6).
TDS7 and TDS8 handle collation in slightly different ways:

TDS7
- every database have it's collation
- columns inherit collation from database
- system informations (query, column names and so on) are passed in ucs2
format (always!)
- single-byte columns data use default collation of current database

TDS8
- every database have it's DEFAULT collation
- every columns have it's collation
- system informations (query, column names and so on) are passed in ucs2
format (like TDS7)
- single-byte columns data use collation specified (we can use different
collation for every column)

How to handle different behavior??
I think we should have some fixed iconv structures (like database one
and ucs2) and cache others conversions.
Also tds_get_string is not sufficient (perhaps tds_get_string(...,
conversion_info) )

bye
freddy77





Archive powered by MHonArc 2.6.24.

Top of Page