Skip to Content.
Sympa Menu

freetds - Re: [freetds] How to get UTF-8 back in application

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: bohica AT ntlworld.com
  • To: FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] How to get UTF-8 back in application
  • Date: Tue, 19 Jul 2005 14:57:09 +0100 (BST)

Daniel,

Cheers.

The combined setup gets the client charset from freetds.conf so now isql is
viable.

Strangely, running isql to my data source now gives the following in the
freetds.log:

14:51:08.493929 Starting log file for FreeTDS 0.63
on 2005-07-19 14:51:08 with debug level 99.
14:51:08.494340 names for ISO-8859-1: ISO-8859-1
14:51:08.494390 names for UTF-8: UTF-8
14:51:08.494422 names for UCS-2LE: UCS-2LE
14:51:08.494452 names for UCS-2BE: UCS-2BE
14:51:08.494482 iconv to convert client-side data to the "UTF-8" character set

(note the convert client to utf-8) which is just what I wanted BUT tsql still
does:

locale is "en_US"
using default charset "ISO-8859-1"

14:51:55.663104 Starting log file for FreeTDS 0.63
on 2005-07-19 14:51:55 with debug level 99.
14:51:55.663339 names for ISO-8859-1: ISO-8859-1
14:51:55.663380 names for UTF-8: UTF-8
14:51:55.663405 names for UCS-2LE: UCS-2LE
14:51:55.663428 names for UCS-2BE: UCS-2BE
14:51:55.663481 iconv to convert client-side data to the "ISO-8859-1"
character
set

I'm not as bothered about tsql; I only tried it when I could not get client
charset picked up from isql and thought it might work better with client
charset.

Thanks again.


On 19-Jul-2005 Daniel Fazekas wrote:
>
> On Jul 19, 2005, at 11:26, bohica AT ntlworld.com wrote:
>
>> 1. unixODBC's isql with DSN in unixODBC's system odbc.ini
>> DSN:
>> [msfreetds]
>> driver = freetds
>> Description = freetds test
>> Server = myserver
>> Database = test
>> Port = 1433
>> TDS_Version = 7.0
>> client charset = UTF-8
>> "client charset = UTF-8" in DSN - does not seem to be read by
>> freetds
>
> What you are looking for is the ODBC-combined setup:
>
> http://www.freetds.org/userguide/odbcombo.htm
>
> Basically, you have to remove Server= from your odbc.ini and instead
> add Servername=, setting the latter to a freetds.conf entry's name as
> opposed to a host name.
> Then your freetds.conf file will be read.
>
> --
> fds




Archive powered by MHonArc 2.6.24.

Top of Page