Re: [cx-oracle-users] Antw: Bad conversion of a unicode value?
Brought to you by:
atuining
From: Michael S. <ms...@co...> - 2007-11-28 16:28:10
|
matilda matilda schrieb: >>>> Michael Schlenker <ms...@co...> 28.11.2007 16:31 >>> >=20 >> 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. >=20 > I'm sure Anthony will agree. Especially with the upcoming Py3000 there = will > be many questions to answer regarding byte-strams, unicode-streams, cha= racterset > conversion (implicit/explicit), character representation. I thought Py3k should solve those questions ;-)... I usually write Tcl where unicode just works and you don't step into the = deep morass that Python string/uncode dichotomy is all the time. Basically it = uses a model very close to the one now used by Py3k, but got it stable some ye= ars ago (around Tcl 8.2). For cx_Oracle i would like to see maximum ease of use, e.g. expunge the e= vil NLS_LANG dependency as it should never ever be needed if your using Pytho= n ( case 1: non unicode db encoding -> let cx_Oracle convert to python system= encoding internally or to unicode, and get happy, case 2: unicode db encoding -> l= et cx_Oracle just eat Python Unicode strings and spit them out). There are some pitfalls for literal SQL in the path, but i think you can = write the interface in a way that you don't have to worry about all this stupid= encoding conversion stuff forced upon us by Oracle, Python and other forces... > See the change history to see when Anthony started to focus on characte= r set > conversion. >=20 > Amaury Forgeot d'Arc who also gives valueable input is probably also in= terested > in that topic while speeking and writing a language with many special c= haracters. Probably, but the main benefits come when you need to cross borders betwe= en Oracles iso charsets (e.g. polish and french in one database). >> With that patch (against the cx_Oracle-4.3.3.zip file) at least my tes= t runs through >> cleanly when i set the right environment. One surely can do better....= >=20 > Can you easily enhance the tests in the test directory to unit test the= > charset conversion cases? Haven't looked there yet. But maybe i can rip something from my nosetest = files when done. Basically i need to first get permission to invest more time in these iss= ues with cx_Oracle, it could happen that my manager decides to go a different route... :-(. Michael --=20 Michael Schlenker Software Engineer CONTACT Software GmbH Tel.: +49 (421) 20153-80 Wiener Stra=DFe 1-3 Fax: +49 (421) 20153-41 28359 Bremen http://www.contact.de/ E-Mail: ms...@co... Sitz der Gesellschaft: Bremen | Gesch=E4ftsf=FChrer: Karl Heinz Zachries Eingetragen im Handelsregister des Amtsgerichts Bremen unter HRB 13215 |