Hi,
I've been experimenting with using real unicode strings instead of
normal utf-8 encoded strings on the sandbox/unicode branch.
Some benefits with this approach:
* The code becomes cleaner, strings are always unicode objects
internally and only converted to utf-8 when sent to the browser.
* Other python libraries like Kid templates prefer/requires unicode
strings.
* No longer requires databases to use the utf-8 charset. It will for
example be possible to run trac against a postgresql database
configured with with a ascii, latin1, utf8, etc. charset.
* len(string) will actually return the number of characters in the
string and not the number of bytes in the utf-8 encoded version of
the string. This will fix issues like this:
http://projects.edgewall.com/trac/ticket/2394
The branch currently passes all unit-tests and seems to work well
but I would appreciate some additional testing and feedback on the idea
in general.
http://people.edgewall.com/~jonas/trac-unicode.diff
Cheers,
Jonas
_______________________________________________
Trac-dev mailing list
[email protected]
http://lists.edgewall.com/mailman/listinfo/trac-dev