Skip to Content.
Sympa Menu

freetds - Re: [freetds] UTF8 Sybase pb

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: <aranna AT free.fr>, "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] UTF8 Sybase pb
  • Date: Fri, 27 Jan 2006 16:59:24 -0500

> From: Arnaud L.
> Sent: Friday, January 27, 2006 4:26 PM
>
> Here my FreeTDS configuration for this server :
>
> [MYASE]
> host = machine
> port = 6000
> tds version = 5.0
> client charset = UTF-8
>
>
> When trying to connect, i have :
>
> [root@migoo freetds-0.63]# tsql -U mylogin -S MYASE locale is
> "en_US" locale charset is "ISO-8859-1" Password: Msg 5704, Level
> 10, State 1, Server TNGI, Line 0 Changed client character set
> setting to 'iso_1'.
>
> When i make a select on utf8 table, the output is iso1 (like indicate
> on login)..
>
> What wrong ?

This is a choice tsql is making. IIRC tsql examines your locale
settings. If it finds one, it uses that instead of your freetds.conf
settings. Otherwise it defaults to ISO 8859-1.

Rationale: Some of the APIs don't offer a way to set the library's idea
of the client character set. By keeping a default client charset in
freetds.conf, we avoid requiring the application to set its locale and
we avoid requiring the client machine's administrator to do anything.

However, freetds.conf describes servers, not clients. A smart
application on a correctly configured machine can know and set its
locale (and character set), and override the freetds.conf default. On
your machine, it seeems tsql is just that kind of application.

This is as it should be, if you ask me. If your machine is configured
for ISO 8859-1, it can't display very much UTF-8 data correctly, and
FreeTDS will convert whatever it can for you to ISO 8859-1 (which you
can display). If you want to use UTF-8 on the client, set the
environment accordingly, and you should be OK.

If that doesn't work, please provide the output to locale(1).

HTH.

--jkl

-----------------------------------------
The information contained in this transmission may be privileged and
confidential and is intended only for the use of the person(s) named
above. If you are not the intended recipient, or an employee or agent
responsible
for delivering this message to the intended recipient, any review,
dissemination,
distribution or duplication of this communication is strictly prohibited. If
you are
not the intended recipient, please contact the sender immediately by reply
e-mail
and destroy all copies of the original message. Please note that we do not
accept
account orders and/or instructions by e-mail, and therefore will not be
responsible
for carrying out such orders and/or instructions. If you, as the intended
recipient
of this message, the purpose of which is to inform and update our clients,
prospects
and consultants of developments relating to our services and products, would
not
like to receive further e-mail correspondence from the sender, please "reply"
to the
sender indicating your wishes. In the U.S.: 1345 Avenue of the Americas, New
York,
NY 10105.




Archive powered by MHonArc 2.6.24.

Top of Page