Skip to Content.
Sympa Menu

freetds - RE: [freetds] Problem of unicode ( non-english character )

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "Lowden, James K" <LowdenJK AT bernstein.com>
  • To: "FreeTDS Development Group" <freetds AT lists.ibiblio.org>
  • Subject: RE: [freetds] Problem of unicode ( non-english character )
  • Date: Fri, 26 Mar 2004 11:38:43 -0500

> From: edwardspl AT ita.org.mo [mailto:edwardspl AT ita.org.mo]
> Sent: March 26, 2004 10:07 AM
> > On Fri, 26 Mar 2004, edwardspl AT ita.org.mo wrote:
> > > "Lowden, James K" wrote:
> > >
> > > > What character set is your client using?
> > >
> > > Chinese ( Traditional )
> >
> > I think that's a font. I'm looking for your encoding. Do
> > any of these look familiar?
> >
> > $ iconv -l |egrep -i 'chinese|big.*5|utf.*8'
> > UTF-8
> > CHINESE GB_2312-80 ISO-IR-58 CSISO58GB231280
> > BIG-5 BIG-FIVE BIG5 BIGFIVE CN-BIG5 CSBIG5
> > BIG5-HKSCS BIG5HKSCS
>
> I want to know how can we convert the charset of unicode from
> MS-SQL...
> Because there are many different clients ( differ user )
> connect to the
> MS-SQL, so I need to config "freetds.conf" support for
> multi-language (
> english and non-english ), but I don't quite to know how to
> set the value
> of client charset of the config file for this function...

FreeTDS will use your system's iconv library to convert your clients'
encoding to/from the form of Unicode used by the server. All you need to do
is make sure FreeTDS uses the system's iconv, and specify the client charset
you want.

1. Make sure libiconv is installed.
2. Make sure FreeTDS detects you iconv library when you run ./configure.
Use "./configure --with-libiconv-prefix=" if need be.
3. Use "iconv -l" to list your iconv's available encodings.
4. Decide which encoding your client will use. I recommend UTF-8, if it
suits you.
5. Add this line to the [global] section in your freetds.conf:
client charset = UTF-8
(or whatever encoding you choose).
6. Test with tsql. If it doesn't work "export TDSDUMP=/tmp/tdsdump", run
tsql again, and look at the log. It will tell you if iconv was engaged
correctly. If it's not clear, send the log here.

UTF-8 can encode all known writing systems, both real and fictional. This of
course includes English and Chinese.

I hope that helps. In the future, please make you questions concrete. Show
us what you did, and what happened. That will make it easier for us to
answer your questions.

--jkl

-----------------------------------------
The information contained in this transmission may contain privileged and
confidential information 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