Re: [Modeling-users] type('') and unicode
Status: Abandoned
Brought to you by:
sbigaret
|
From: Sebastien B. <sbi...@us...> - 2003-07-16 18:29:49
|
Yannick Gingras <yan...@sa...> writes:
> Soif> Could you please give us a bigger traceback.
> Soif> I talk w/ Sebastian last week about this. In fact i got some
> Soif> trouble w/ mysql and unicode (not using modeling), and ask
> Soif> him what he did to cover this issue in modeling.
>=20
> sure !
>=20
[...]
> File
> "/usr/lib/python2.2/site-packages/Modeling/DatabaseAdaptors/AbstractDBAPI=
2AdaptorLayer/AbstractDBAPI2AdaptorChannel.py",
> line 295, in selectAttributes
> db_error(msg)
> File "/usr/lib/python2.2/site-packages/Modeling/logging.py", line 56, in
> log_stderr
> sys.stderr.write('%s\n'%msg)
> UnicodeError: ASCII encoding error: ordinal not in range(128)
Okay, so Soif was right, database logging makes it fails (unsurprisingly
I must admit).
Could you tell what happens if you disable MDL_ENABLE_DATABASE_LOGGING?
Does it fail and if yes, where? (traceback as well would be ok)
[given that you disable the encoding in your makeMatchQual]
> What I said earlier is that I manually utf-8 encode every thing the I
> *store* in the DB. I thought that I might be safe with queries but
> well, utf-8 encoding queries too is not that much work.
Ok. Sorry I did not understand you right. So this is as simple as that,
just encode the attributes' value and that's it? I must try that on of
these days.
-- S=E9bastien.
|