Am 05.04.2006 um 13:15 schrieb Christian Boos:
I've done several fixes for Unicode issues lately, and while I
can't be sure
that everything works now, I think we're nearly there.
There is still one place where we do conversion from str objects to
unicode objects, when we don't know nothing about those str objects.
We then assume that there are UTF-8 encoded (this is r3084).
I think we should always know or make clear what is the encoding.
If we really don't know, then we should not assume UTF-8 (which
may or may not work, who knows), but rather use some "catch all"
conversion (trac.util.to_unicode, namely).
Therefore, we should revert r3084 and instead do the following in
HDFWrapper.add_value:
I agree that we should revert r3084.
About expecting ISO-8859-15 instead of UTF-8... what about backwards
compatibility? Plugins written against 0.9 might be pushing UTF-8
encoded strings into the HDF, and that should continue to work.
Rather than assuming Latin-1, I think we should assume UTF-8 and use
unicode(bla, errors='replace') to make the effects of decoding
problems less drastic.
Cheers,
Chris
--
Christopher Lenz
cmlenz at gmx.de
http://www.cmlenz.net/
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev