2007/8/13, Christophe de VIENNE <[EMAIL PROTECTED]>: > 2007/8/13, Paul Johnston <[EMAIL PROTECTED]>: > > > > Longer term, if PyODBC can support unicode statements on Unix, that's > > amazing! > > Having a look at the implementation, the problem comes from that > SQLWCHAR, define in sqltypes.h is not wchar_t in some cases (not mine > at least). > This lead to a 2 bytes-wide characters string read like a simple char* > string. Then the statement sent to the server is only "S"...
I had a closer look. On my platform, I have : sizeof(wchar_t)=4, sizeof(SQLWCHAR)=2 In fact on linux most python are using UCS4 internally, while the odbc implementations uses UCS2 (which is why they don't use wchar_t). I don't know what is the cleaner way to convert back to UCS-2 before calling SQLxxxW functions so I'll leave it here for now. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "sqlalchemy" group. To post to this group, send email to [email protected] 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 -~----------~----~----~----~------~----~------~--~---
