Skip to Content.
Sympa Menu

freetds - RE: [freetds] status and stability

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddyz77 AT tin.it>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] status and stability
  • Date: Wed, 14 May 2003 19:07:14 -0000


> Seeing as you've hand-edited (to our advantage) the perl-generated section,
> I think we should pull the perl code out and sort the list alphabetically,
> to make things easier to find, unless there's some reason not to. Thanks
> for rationalizing the names, too. Do you think we can ignore case
> (strcasecmp(3))? ISTM the list would be shorter, and I can't imagine two
> different character sets whose names differed only by case.
>

Someone accept iso8859_1 but not ISO8859_1...
I agree to remove perl code


> One question, though, because you seem to have an idea different from mine.
> When Sybase sends you its charset name "iso88597", and you're using HP
> iconv, how are you going to locate the iconv name that HP uses?
>

I use a cache. From iconv.c:

static const char *iconv_names[sizeof(canonic_charsets) /
sizeof(canonic_charsets[0])];

Here I store iconv names relative to canonic names (same index, TODO:
use index for canonic instead of names??).
On initialization I compute ISO8859-1, UTF-8 and UCS-2LE/UCS-2BE (some
sytem have only a UCS-2 version so I think it's a good idea to write
code to swap). Assuming I want to convert our "XXX" charset to UTF-8.
1- get canomic name of XXX (your yesterday patch), call it YYY
2- is YYY on cache, just use this name. stop. if not, continue
(if cache is an empty string use memcpy, if is cache but we cannot
convert an indirect conversion is required... read below..)
3- try to create conversion from YYY to UTF-8. if is possible stop and
cahe name
4- try to create conversion with all alias to UTF-8. if possible stop
and cache name
5- try to create conversion with all alias to UCS-2. if possible stop,
cache name and mark undirect translation
6- work case... cache empty string and do a memcpy...

> My idea is to use src/tds/sybase_character_sets.h to get the canonical name,
> and src/tds/alternative_character_sets.h to back into the iconv name. But,
> to do that, we somehow have to identify the name to use. (We could try each
> one in turn, I guess.)
>

the "identity name" should be out canonical name... Or have I
misunderstood ??

IMHO we should remove C99 and JAVA charset. I don't think any client
want something like "\\x23abc" returned...

freddy77






Archive powered by MHonArc 2.6.24.

Top of Page