M
morris carre
I have a strange problem : some code that fetches queries from an mssql
database works fine under Idle but the very same code run from a shell
window obtains its strings garbled as if the encoding codepage was
modified. This occurs only when using pymssql to connect; if I connect
through odbc (using the odbc module included in pywin) this problem
vanishes.
I briefly thought sys.getdefaultencoding() would pin it down but the
value is "ascii" in all cases.
If anyone has a lead as to what may be happening here or how to solve it
(apart from using odbc, that is), advice is welcome.
I am using python 2.4.2 and pymssql 0.7.3 under win2k sp4 on the client
machine, while the server machine has windows server 2003 + sqlserver2k,
locale is fr_CH. For an example of garbling, I get '\x8a' where I should
get '\xe8'
TIA, mc
database works fine under Idle but the very same code run from a shell
window obtains its strings garbled as if the encoding codepage was
modified. This occurs only when using pymssql to connect; if I connect
through odbc (using the odbc module included in pywin) this problem
vanishes.
I briefly thought sys.getdefaultencoding() would pin it down but the
value is "ascii" in all cases.
If anyone has a lead as to what may be happening here or how to solve it
(apart from using odbc, that is), advice is welcome.
I am using python 2.4.2 and pymssql 0.7.3 under win2k sp4 on the client
machine, while the server machine has windows server 2003 + sqlserver2k,
locale is fr_CH. For an example of garbling, I get '\x8a' where I should
get '\xe8'
TIA, mc