lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]



On Fri, Mar 9, 2012 at 12:00 PM, Scott Morgan <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).


[1]: http://luaforge.net/tracker/index.php?func=detail&aid=47567&group_id=12&atid=166