Your suggested change is in trunk. I am trusting you one this since I
am not a MSSQL user and cannot test it. If anybody else is using
MSSQL2Adaperter, i.e.
DAL('mssql2://....')
please check that this change does not break your code.
On Jun 27, 3:30 pm, E L <[email protected]> wrote:
> Hello
>
> Rather than storing strings as UTF8 in VARCHAR, I would like to store
> the strings as NVARCHAR in MSSQL.
> It appears that is what MSSQL2Adapter is meant to do, but there were
> errors when I tried to use it.
> I believe a couple changes in the MSSQLAdapater code could make it
> work (it seems to work for me).
> I'm using python 2.7, pyodbc 2.1.8.
>
> Eric
>
> - if fieldtype == 'string' or fieldtype == 'text' and value[:1]=="'":
> + if (fieldtype == 'string' or fieldtype == 'text') and value[:1]=="'":
>
> - return self.log_execute(a,'utf8')
> + return self.log_execute(a.decode('utf-8'))