[GENERAL] Invalid client charset when using TDS_FDW - Mailing list pgsql-general

From Igal @ Lucee.org
Subject [GENERAL] Invalid client charset when using TDS_FDW
Date
Msg-id 04a23bb0-3409-7112-f297-70991a42adc1@lucee.org
Whole thread Raw
List pgsql-general

Hi,

I am trying to connect to a MSSQL database via the tds_fdw extension.  I've installed the extension version 1.0.8 from BIGSQL on a Windows machine.

I get a client charset invalid though, and I'm not sure where it is set or what to set it to:

config.c:886:Setting tds version to 7.3 (0x703).
config.c:788:TDS version set to 7.3 from $TDSVER.
config.c:765:Setting 'dump_file' to 'C:\temp\freetds.log' from $TDSDUMP.
dblib.c:1237:tdsdbopen: Calling tds_connect_and_login(00000000003DF9D0, 00000000003BE2B0)
iconv.c:328:tds_iconv_open(00000000003DF9D0, CP1252;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C)
iconv.c:187:local name for ISO-8859-1 is ISO-8859-1
iconv.c:187:local name for UTF-8 is UTF-8
iconv.c:187:local name for UCS-2LE is UCS-2LE
iconv.c:187:local name for UCS-2BE is UCS-2BE
iconv.c:346:setting up conversions for client charset "CP1252;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C"
iconv.c:348:preparing iconv for "CP1252;LC_CTYPE=English_United States.1252;LC_MONETARY=C;LC_NUMERIC=C;LC_TIME=C" <-> "UCS-2LE" conversion
iconv.c:423:tds_iconv_info_init: client charset name "-1" invalid

It looks like the error comes form https://github.com/wankdanker/freetds/blob/master/src/tds/iconv.c#L424

I believe that I can set the "client charset" in a .freetds.conf file, but I'm not sure what to set it to since CP1252 seems very valid.  Or perhaps it should be set to "CP1252" only without the Locale information afterwards?

Any ideas?

Thanks,

Igal Sapir
Lucee Core Developer
Lucee.org

pgsql-general by date:

Previous
From: Rob Sargent
Date:
Subject: Re: [GENERAL] idle in transaction, why
Next
From: Zarko Aleksic
Date:
Subject: Re: [GENERAL] the database system is shutting down - terminatingwalsender process due to replication timeout