UTF-16 support

Daniel Fazekas <[email protected]>
Newsgroups gmane.comp.db.tds.freetds
Message-ID <[email protected]>
I'm testing the recently committed UTF-16 support.

I believe this line in src/tds/config.c's tds_config_login() is wrong:
connection->use_utf16 = login->use_utf16;

It only ends up turning off the UTF-16 support you asked for in the configuration files, which previously got read into the "connection" structure, with a zero from the "login" structure. So the "use utf-16 = yes" line from freetds.conf gets overwritten and ignored.
Simply removing the line works, or wrapping it like all the other boolean options:
if (login->use_utf16) {
	connection->use_utf16 = login->use_utf16;
}

Then everything appears to work fine with dblib and ctlib.
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.