Skip to Content.
Sympa Menu

freetds - [freetds] [ freetds-Patches-3298035 ] Expose client charset as an odbc connection parameter

freetds AT lists.ibiblio.org

Subject: FreeTDS Development Group

List archive

Chronological Thread  
  • From: "SourceForge.net" <noreply AT sourceforge.net>
  • To: noreply AT sourceforge.net
  • Subject: [freetds] [ freetds-Patches-3298035 ] Expose client charset as an odbc connection parameter
  • Date: Thu, 5 May 2011 19:35:19 +0000

Patches item #3298035, was opened at 2011-05-05 19:35
Message generated for change (Tracker Item Submitted) made by
You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=3298035&group_id=33106

Please note that this message will contain a full copy of the comment thread,
including the initial issue submission, for this request,
not just the latest update.
Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Private: No
Submitted By: https://www.google.com/accounts ()
Assigned to: Nobody/Anonymous (nobody)
Summary: Expose client charset as an odbc connection parameter

Initial Comment:
We would like to develop against some mssql dbs from an ubuntu linux
environment, but had a very hard time configuring unixodbc/freetds to
acknowledge the freetds.conf file, which is the only way to configure client
charset, which is necessary for proper unicode support. The packaged ubuntu
unixodbc and freetds binaries are configured by default with unixodbc as the
driving configurator for freetds. So rather than bending over backwards to
set things up in a way that they don't want to be set up, I made a very small
patch to expose the client charset configuration as an odbc connection
parameter. Seems like you would want it to be anyway.

This patch is made against freetds-0.82.1.dev.20110409. I added the
following four lines after line 175 in src/odbc/connectparams.c:

tmp[0] = '\0';


if (SQLGetPrivateProfileString(DSN, "Client_Charset", "", tmp,
FILENAME_MAX, "odbc.ini") > 0) {

tds_dstr_copy(&connection->client_charset, tmp);


}

Now you can put Client_Charset=UTF-8 in your odbc.ini or your connect string.


----------------------------------------------------------------------

You can respond by visiting:
https://sourceforge.net/tracker/?func=detail&atid=407808&aid=3298035&group_id=33106




Archive powered by MHonArc 2.6.24.

Top of Page