On Nov 3, 2007 12:01 PM, Paul Johnston <[EMAIL PROTECTED]> wrote: > > Florent, > > >I just added ticket #839 to the trac and attached a patch that enables > >unicode conversion for MSSQL dialects. > >I tested it with pyodbc but it should work the same with the other dialects. > > > > > What's the benefit of doing this? I've found that you usually want to > pass python unicode objects to PyODBC and adodbapi; utf-8 encoded > strings don't work properly (they end up as literally that - utf-8 byte > strings, stored in a 16-bit string container).
I have 10 different instances the each have their own collation names (latin1, greek, russian...) I have a master database that references all thos instances + their collation names. I use this master database to create the engines to the different dbs. I would like to be able to just pass the encoding for each engine at creation time an forget about it. Then when I do my requests, whatever the encoding I am assured to only manipulate unicode objects and thus to be able to encode everything to unicode in the final database (postgresql). I don't want to have to handle the encoding of each object just to perform a decode on it before re-encoding it to utf8. In my use case I am doing read-only queries only on mssql so I have not concerned myself too much with the writting back to the db. I suppose that if I did so I would like to encode my unicode objects back to the right encoding before passing them to my queries... But in all the cases my encoding/decoding is always on the borders of my program and I can always count on the fact that all my "strings" are unicode objects everywhere. Florent. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to sqlalchemy@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/sqlalchemy?hl=en -~----------~----~----~----~------~----~------~--~---