Closed sqlalchemy-bot closed 15 years ago
Anonymous wrote:
Patch to add the autotranslate dburi argument for MSSQL ODBC.
Michael Trier (empty) wrote:
This was corrected already with the odbc_autotranslate parameter. Additionally, dfd71d6ac86dd6be197232f56e20f6d28f41afa0 now handles connect args like normal and you can pass any other parameters you want to the backend as demonstrated here: http://www.sqlalchemy.org/docs/05/dbengine.html#dbengine_establishing_custom
Changes by Michael Bayer (zzzeek): removed "0.5.xx" milestone
Changes by Michael Bayer (zzzeek): set milestone to "0.5.xx"
Changes by Anonymous: set attachment to "sa_mssqlodbc_autotranslate_patch.diff"
Changes by Michael Trier (empty): set state to "resolved"
Issue created by Anonymous
This patch adds the possibility to autotranslate=No as an argument on the dburi:
exemple:
dburi = "mssql://user:pass@localhost/testdb?autotranslate=No"
this will enable users to override the default settings (at least on windows) that force the translation of textual data. This way a french windows host will be able to connect to a greek database (with a collation name set to cp1253) and the ODBC layer will not try to translate the textual data.
The intended usage for those cases is to have a model that uses TEXT for the column and then pass convert_unicode=True and encoding="%s" % yourencodinghere on the create_engine() call...
We have worked together with Jerôme Collette and me (Florent Aide) on this patch and this works with live production data from a cp1253 encoded database (Greek) from French Windows XP machines using MDAC 2.8.1
Best regards, Florent.
Attachments: sa_mssqlodbc_autotranslate_patch.diff