I have a unicode string retrieved via a query from a different database on the same Windows Server (MS SQL 2008) .
It is a name with an accent. At the time I process it, it is an intermediate variable with type unicode.
When I try to save it to an nvarchar column, I get an error
File "C:\Users\tim\web2py_dev\gluon\packages\dal\pydal\adapters\base.py", line 523, in update
raise e
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 137: ordinal not in range(128)
this is python 2.7 on Window Server 2008.
I get the error both on web2py 2.16.1 which checked-out DAL v17.11,
and in 2.14.6 with DAL v16.03
I'm using mssql3. Apart from the connection string, I am only using lazy_tables
The database collation is Latin1_General_CI_AS
The database column was varchar up until me encountering this problem; now it is nvarchar.
I don't understand this at all. Where is "ascii" coming from? Is there some lingering table migration which is confusing the DAL?