On Fri, Mar 9, 2012 at 12:00 PM, Scott Morgan <blumf@blueyonder.co.uk
<mailto:blumf@blueyonder.co.uk>> wrote:
On 09/03/12 12:32, Ignacio Burgueño wrote:
This version handles SQL_WCHAR, SQL_WVARCHAR and
SQL_WLONGVARCHAR. I needed to add them some time ago when
dealing with nchar, nvarchar and ntext columns in SqlServer.
How do you transcribe between the 16-bit and 8-bit charsets? Do
you just convert to UTF8 or local codepage?
I don't. I found that I sent this same patch three years ago. Sadly,
the luaforge site is no more, so the bug report [1] is lost (I think).
The call to SQLGetData converts the strings from unicode but I don't
recall the exact details. This sure is no definitive solution. At the
time, I thought about returning the strings unmodified and let the
user do what's needed (convert to utf-8 using some library, whatever).