Menu

Commit [r3118]  Maximize  Restore  History

More unicode tweaks:

* if no encoding was specified, `Request.write` will encode an unicode string using ''utf-8'' instead of ''ascii''
* the `trac.util.to_unicode` function is now "smarter": when the optional `charset` parameter is not given, it will first try to convert from ''utf-8'', then from the locale preferred encoding. In any case, the conversion '''will''' succeed, if necessery using either replacement characters or a '1-to-1' encoding, depending on the value of the `lossy` optional parameter.
* unit tests for the `to_unicode` function have been added
* deprecate the `trac.util.to_utf8` utility function, which is not used anymore
* the TracIni configuration file is converted to `unicode`. Should fix #2972.

cboos 2006-04-10

changed /trunk/trac/config.py
changed /trunk/trac/util/__init__.py
changed /trunk/trac/util/markup.py
changed /trunk/trac/util/tests/__init__.py
added /trunk/trac/util/tests/text.py
changed /trunk/trac/web/api.py
changed /trunk/trac/web/clearsilver.py
/trunk/trac/config.py Diff Switch to side-by-side view
Loading...
/trunk/trac/util/__init__.py Diff Switch to side-by-side view
Loading...
/trunk/trac/util/markup.py Diff Switch to side-by-side view
Loading...
/trunk/trac/util/tests/__init__.py Diff Switch to side-by-side view
Loading...
/trunk/trac/util/tests/text.py Diff Switch to side-by-side view
Loading...
/trunk/trac/web/api.py Diff Switch to side-by-side view
Loading...
/trunk/trac/web/clearsilver.py Diff Switch to side-by-side view
Loading...
MongoDB Logo MongoDB