Re: [Modeling-users] type('') and unicode
Status: Abandoned
Brought to you by:
sbigaret
From: Sebastien B. <sbi...@us...> - 2003-07-16 21:46:56
|
Yannick Gingras <yan...@sa...> writes: > Couldn't evaluate expression SELECT t0.gl_id, t0.account, t0.control_acct, > t0.uom_id, t0.acct_type, t0.is_active, t0.gvt_code FROM GL t0 WHERE > (t0.is_active <> -255 AND t0.account LIKE '%=C3=A9=C3=A9%' AND t0.gvt_cod= e LIKE > '%%'). Reason: exceptions.UnicodeError:ASCII encoding error: ordinal not = in > range(128) > Traceback (most recent call last): > File "/usr/lib/python2.2/site-packages/Modeling/DatabaseChannel.py", li= ne > 381, in selectObjectsWithFetchSpecification > entity) > File > "/usr/lib/python2.2/site-packages/Modeling/DatabaseAdaptors/AbstractDBAPI= 2AdaptorLayer/AbstractDBAPI2AdaptorChannel.py", > line 297, in selectAttributes > raise GeneralAdaptorException, msg > Modeling.Adaptor.GeneralAdaptorException >=20 [...] Okay, that comes from the database then, if we're at this point. Data was encoded w/ utf-8 before being sent. The fact is the framework is definitely not ready to accept raw unicode strings (the validation fails, then if we solve this SQLExpression fails to build the sql statement, etc.). Before I appear too stupid when trying things: UTF-8 is just a specific way of encoding unicode in eight bits, right, i.e. one character is translated to a serie of one to many characters, right? It has nothing to do w/ ISO-8859-1, ISO-8859-15 etc. which are just correspondance table between a number coded in one byte and a given character, right? > I'll see what I can do but unicode support is not with MySQL 4.0, it's wi= th > 4.1 which is still alpha... >=20 > http://www.mysql.com/doc/en/Nutshell_4.1_features.html mysql is known to be quite active, do you know when this will become the production release? Postgresql supports unicode/utf-8:=20 http://developer.postgresql.org/docs/postgres/multibyte.html SQLite supports it also (w/ some precautions for ORDER BY, LIKE, etc.): http://groups.yahoo.com/group/sqlite/message/1675 These links are for the archives. I /think/ I begin to see the light in this "mess" :) -- S=E9bastien. |