I'm on top of this "issue" in these days, but in the end we will just have 
to create yet another adapter (maybe a mssql*u* , mssql3*u* and mssql4*u*).
The problem is subtle, and goes pretty unnoticed.
If - as I - you create an app with mssql: (or mssql3, or mssql4) which have 
"varchar" type the odbc underlying mappings store happily the utf8 
representation when needed and they fetch it back. Sure, it's garbled but 
from web2py's standpoint what you insert is what you retrieve, so no 
problems there. Bonus points of messiness because on linux there's often 
another middleware involved (freetds), which does the conversion 
implicitely without telling a soul about it.
The problem arises with existing databases when trying to store and fetch 
from nvarchar values, that are NOT inherently converted to/from unicode 
utf8. They need to be passed as u'something' and you'll get back a unicode. 
No str whatsoever.
Still, web2py by default SHOULD use *n*varchar fields for "modern" 
applications, to enable integration with existing databases or just letting 
other applications read correctly the data stored in 'string' fields.

-- 
Resources:
- http://web2py.com
- http://web2py.com/book (Documentation)
- http://github.com/web2py/web2py (Source code)
- https://code.google.com/p/web2py/issues/list (Report Issues)
--- 
You received this message because you are subscribed to the Google Groups 
"web2py-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to