Skip to Content.
Sympa Menu

freetds - Re: [freetds] Sybase Univarchar Conversion

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Frediano Ziglio <freddy77 AT gmail.com>
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Sybase Univarchar Conversion
  • Date: Mon, 21 Jun 2010 14:24:49 +0200

2010/6/20 Brad Wery <bradwery AT gmail.com>:
> Can you point me to some documentation that outlines how to setup UTF-8? I
> can't use config files for this because end users may not know how to set
> this up.
>

See official documentation at http://www.freetds.org/userguide/ (freetds.conf)

> How can I add support for wide encoding?
>

Many ODBC functions (all that handle strings as parameter) have
"normal" multibyte version and wide version (ie SQLPrepare and
SQLPrepareW). We do not support wide version functions. Adding them
require to add these functions. Note that libTDS accept only multibyte
(there are some parsing functions) so you have to (choose one):
- add support for two versions (multi/wide) at the same time
- convert everything in a multi-byte that support any wide character
(that is utf8)
- support wide and pass always wide version.

There is no planning for this stuff, if you want to try or discuss you
are really welcome.

freddy77


>
> On Sun, Jun 20, 2010 at 6:58 AM, Frediano Ziglio <freddy77 AT gmail.com> wrote:
>
>> 2010/6/19 Brad Wery <bradwery AT gmail.com>:
>> > This one is a bit over my head. With other ODBC drivers, I don't have to
>> do
>> > anything special and Unicode characters come back from the database
>> correct.
>> > With FreeTDS, the characters are converted and some actually turn to "?".
>> >
>> > I won't know the configuration of the server before hand, nor will I know
>> > the language of the strings stored in the database.
>> >
>> > I noticed that a lot of people ask about this. Is it a bug? I did notice
>> > this code in token.c:
>> >
>> > if (curcol->on_server.column_type == SYBLONGBINARY && (
>> >        curcol->column_usertype == USER_UNICHAR_TYPE ||
>> >        curcol->column_usertype == USER_UNIVARCHAR_TYPE)) {
>> >        /* FIXME ucs2 is not UTF-16... */
>> >        /* FIXME what happen if client is big endian ?? */
>> >        curcol->char_conv = tds->char_convs[client2ucs2];
>> >    }
>> >
>> > I couldn't help but notice the fix me labels. Is this the cause?
>> >
>> > Thanks,
>> >
>> > Brad
>>
>> No, if you doin't use klingon or other strange languages. You have to
>> set up utf-8. The problem is that we do not still support wide
>> encoding.
>>
>> freddy77
>> _______________________________________________
>> FreeTDS mailing list
>> FreeTDS AT lists.ibiblio.org
>> http://lists.ibiblio.org/mailman/listinfo/freetds
>>
> _______________________________________________
> FreeTDS mailing list
> FreeTDS AT lists.ibiblio.org
> http://lists.ibiblio.org/mailman/listinfo/freetds
>




Archive powered by MHonArc 2.6.24.

Top of Page