- changed milestone to 0.5.xx
[patch] convert_unicode flag is not properly enforce with MSSQL dialect
Since 0.5.0 (it worked in 0.5.0rc4) the new types system of MSSQL dialect has introduced a new _StringType that does not implement the unicode convertion in the result processor.
This means that the result data for Text columns are not converted to unicode objects anymore.
Please find attached a patch that fixes this.
I would like to add a unit test to this (I have a mssql test env setup) but unfortunately I don't know where to pass the convert_unicode flag to the mssql engine to test this.
Comments (12)
-
repo owner -
Account Deleted pyodbc - mssql 2005
-
Account Deleted Please this is not a minor issue. This is a big regression that provokes all textual data coming from MSSQL databases to be returned as python strings instead of unicode objects.
I have the same problem with pyodb 2.0.35 and 2.1.3
-
-
Account Deleted and the problem is the same with MSSQL 2000 and MSSQL 2005
the good new is that my patch solves the issue with both 2000 and 2005
-
repo owner Replying to guest:
Please this is not a minor issue.
well that's why priority is "medium" and not "low" ;) the "severity" indicates how long it will take to fix the issue. clearly its just a choice of "process unicode, dont process unicode" so the level of code involved is not great.
we're just trying to determine why our own tests don't have this issue with the current trunk. it does seem so far like tests will remain passing with unicode processing re-enabled.
-
Account Deleted I realised this after clicking submit :) Thanks Mike. I'm trying to help empty find the test pb on IRC right now.
-
Account Deleted - attached convert_unicode_test.diff
unicode conversion test case for mssql
-
Account Deleted attached is a test case demonstrating the error that works once my patch is applied...
run with :
python.exe test/dialect/mssql.py --db=mssql QueryUnicodeTest.test_convert_unicode
(take care of your test.cfg file to have proper mssql2000 database delared)
-
This works great. Now I just need to evaluate the impact on other dbapis for mssql.
-
fixed in 52e2c2d916fb45d8169d6b273db2b39b0fc8ccee. Thank you faide.
-
repo owner - removed milestone
Removing milestone: 0.5.2 (automated comment)
- Log in to comment
what driver are you using ? our tests are passing at the moment