Skip to Content.
Sympa Menu

freetds - [freetds] iconv and tds

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "ZIGLIO Frediano" <Frediano.Ziglio AT vodafone.com>
  • To: <freetds AT lists.ibiblio.org>
  • Subject: [freetds] iconv and tds
  • Date: Wed, 8 Oct 2003 17:18:14 +0200

Every TDSCOLINFO has a iconv_info field. This for compatibility with
mssql2k (where every column can have a different type).
We don't use this field very much. I think we should set this field for
every column that require a conversion (even using TDS5!) and adjust
column size even for single byte column (like VARCHAR, not only
NVARCHAR). In this way we can just use this pointer in tds_get_char_data
(read.c). This pointer should point to a structure in tds->iconv_info,
however this array must be resized so the pointer could change. A
solution should use a TDSICONVINFO ** for tds->iconv_info and allocate
every TDSICONVINFO separately. At this point I suggest to replace
iconv_info_count/iconv_info with a iconv_info_private (or something like
that) structure. So we separate TDSICONVINFO handling in iconv.c
entirely (using iconv_info in column we avoid the need to access to
tds->iconv_info as an array).

Time ago I was thinking about changing TDSICONVINFO structure removing
charset names and just storing our canonic index. In such way we reduce
memory usage and improve performance.

Another idea using directly TDSICONVINFO (always as a pointer, without
pointer operations) is the possibility to define a private TDSICONVINFO
separating other possible iconv implementations.

freddy77




Archive powered by MHonArc 2.6.24.

Top of Page