Re: [cx-oracle-users] Antw: Bad conversion of a unicode value?
Brought to you by:
atuining
From: Anthony T. <ant...@gm...> - 2007-11-29 18:48:19
|
Yes, I just looked through my e-mail and noticed this one. Some of the patch has already been applied but the addition of a new type that returns and accepts unicode I have not yet done. Recently I have been looking into this again (in conjunction with the ceODBC module) and ran into a few difficulties since most Unix builds are wide unicode and not narrow. Windows, of course, is different in this respect. Your code assumes a narrow build so I'd have to come up with a solution for that. I believe somewhere in this thread a solution to that problem has been given but I'll have to see if it really solves the problem or not. My apologies for dropping this one for so long. You should be more persistent and send it to me every few months. :-) If you don't, unless the patch is simple and obvious or I actually need it, it tends to get lost. And since Unicode is tough, I've also tended to avoid it somewhat. :-( Hopefully I'll be able to get some time to work on this in the next few weeks. Bug me again in January if you haven't heard anything about it before then. On Nov 28, 2007 9:32 AM, Amaury Forgeot d'Arc <ama...@gm...> wrote: > matilda matilda wrote: > > >>> Michael Schlenker <ms...@co...> 28.11.2007 16:31 >>> > > >Michael Schlenker schrieb: > > > Okay, i got my test to work after patching cx_Oracle a little bit. > > > > Anthony will be happy to hear that. ;-) Anthony: Are you still here? > > > > > From taking a closer look at the code Unicode support is at best to be described as > > >'rudimentary', lots of fine points still missing in there. > > > > I'm sure Anthony will agree. Especially with the upcoming Py3000 there will > > be many questions to answer regarding byte-strams, unicode-streams, characterset > > conversion (implicit/explicit), character representation. > > > > See the change history to see when Anthony started to focus on character set > > conversion. > > > > Amaury Forgeot d'Arc who also gives valueable input is probably also interested > > in that topic while speeking and writing a language with many special characters. > > I indeed proposed a patch one year ago, to support unicode. > It was against version 4.2.1, I join it again in the hope it can be useful. > > Here are the comments I sent at the time: > > The visible changes are: > - a new cx_Oracle.UNICODE variable type, which accepts and return > unicode values. > - NVARCHAR columns will return this variable type. > - a new test file: UnicodeVar.py covers the most common cases. > > There are some caveats: > - I based my work on the new vt_NationalCharString type (and its > charsetForm member). As there are no unit tests for it, I may have > broken something there. Same for the new NCLOB type. > - Automatic conversion between string and unicode could be supported > (should be easy to add, by using connection.encoding) > - I suspect it will only work if Python is compiled in UCS2 mode. > (== sizeof(PyUNICODE) must be 2) > > -- > Amaury Forgeot d'Arc > > ------------------------------------------------------------------------- > SF.Net email is sponsored by: The Future of Linux Business White Paper > from Novell. From the desktop to the data center, Linux is going > mainstream. Let it simplify your IT future. > http://altfarm.mediaplex.com/ad/ck/8857-50307-18918-4 > _______________________________________________ > cx-oracle-users mailing list > cx-...@li... > https://lists.sourceforge.net/lists/listinfo/cx-oracle-users > > |