handling unicode data

"Martin v. Löwis" martin at v.loewis.de
Thu Jun 29 22:10:05 CEST 2006


Filipe wrote:
>> Also, it appears that DB-Library (the API used by pymssql) always
>> returns CP_ACP characters (unless ANSI-to-OEM conversion is enabled);
>> so the "right" encoding to use is "mbcs".
> 
> do you mean using something like the following line?
> term = unicode(row[1], "mbcs")

Correct.

> What do you mean by "ANSI-to-OEM conversion is enabled"? (sorry, I'm
> quite a newbie to python)

It's an SQL server thing more than a Python thing. See AutoAnsiToOem
in

http://support.microsoft.com/default.aspx?scid=KB;EN-US;199819

Regards,
Martin



More information about the Python-list mailing list