Skip to Content.
Sympa Menu

freetds - Re: [freetds] Transliteration

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: Tera <teranius AT mail.ru>
  • To: "James K. Lowden" <jklowden AT freetds.org>, FreeTDS Development Group <freetds AT lists.ibiblio.org>
  • Subject: Re: [freetds] Transliteration
  • Date: Sat, 22 Apr 2006 12:02:01 -0800

On 22/04/2006 06:10 Pm, James K. Lowden wrote:

> Tera wrote:
>> Does FreeTDS support translation
>> between charsets?
>
> Yes, for Microsoft servers using version 7.0 or 8.0 of the TDS protocol.
>
>> In our particular situation client is on Mac OS with
>> french localization (app encoding is MacRoman) and server
>> localization is Latin 1 (Windows 1252).
>
> If you iconv library supports those two encodings, it should work. In your
> freetds.conf, try:
>
> client charset = MACROMAN
>
> (assuming you're using Apple's iconv library). FreeTDS will detect the
> server's charset and convert between them. You can confirm what it's
> doing by setting TDSDUMP; the encodings are recorded at the beginning of
> the log file.

Thanks. I'll try this method on Monday.

However. I found this info in the doc:

http://freetds.org/userguide/nonwestern.htm

"TDS 7.0 for Nonwestern Languages"
...
"To learn what character set the client is using, FreeTDS examines
the freetds.conf entry. If it finds nothing there, it assumes the
client is using ISO-8859-1. That is generally a safe assumption for
western languages such as English or French, but produces garbage
for other languages."

Strangely, it specifically talks about _nonwestern_ languages and
claims that everything should work ok for French right of the box,
which is not the case for us.

Then. Currently we use "ODBC-only" configuration and optionally
"DSN-less" configuration (in the latter case we specify all the
settings in the connect string to SQLDriverConnect bypassing
freetds.conf file). Is there a way to specify client charset in
these configurations, e.g. ODBC-only? By analogy, I can specify
"tds version" setting in odbc.ini file (just in slightly different
form as "tds_version") why not the same with "client charset"
setting? What if I use DSN-less configuration and bypass
freetds.conf file all-together specifying all the settings in
the connect string to SQLDriverConnect? Maybe some explicit
SQLSetConnectAttr attribute exists to specify client charset?

Regards,
Tera





Archive powered by MHonArc 2.6.24.

Top of Page