handling unicode data
Filipe
fcorreia at gmail.com
Wed Jun 28 13:32:12 EDT 2006
Hi,
Martin v. Löwis 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")
What do you mean by "ANSI-to-OEM conversion is enabled"? (sorry, I'm
quite a newbie to python)
> Notice that Microsoft plans to abandon DB-Library, so it might be
> best to switch to a different module for SQL Server access.
I've done some searching and settled for pymssql, but it's not too late
to change yet.
I've found these options to connect to a MSSqlServer database:
Pymssql
http://pymssql.sourceforge.net/
ADODB for Python (windows only)
http://phplens.com/lens/adodb/adodb-py-docs.htm
SQLServer for Python (discontinued?)
http://www.object-craft.com.au/projects/mssql/
mxODBC (commercial license)
http://www.egenix.com/files/python/mxODBC.html
ASPN Recipe
http://aspn.activestate.com/ASPN/Cookbook/Python/Recipe/144183
Pymssql seemed like the best choice. The ASPN Recipe I mention doesn't
look bad either, but there doesn't seem to be as many people using it
as using pymssql. I'll look a little further though.
More information about the Python-list
mailing list