Don wrote: > I am using Trac .10b1, Python 2.4, mod_python with the Trac-cc plugin. >
Trac 0.10 introduced a radical change w.r.t. to management of strings. In order to manipulate internationalized text as Unicode strings, we now use `unicode` Python objects wherever we can internally, instead of `str` objects containing UTF-8 encoded Unicode characters as we used to do in the past. On the plus side, this makes a whole class of subtle bugs related to the wrong handling of internationalized text go away. The downside is that most plugins should be ported to take this change into account, even though we tried to place some safety guards here and there for still accepting UTF-8 encoded strings from plugins. There's a kind of tutorial about unicode and its usage in Trac that should be helpful to plugin authors: http://trac.edgewall.org/wiki/TracDev/UnicodeGuidelines > Traceback (most recent call last): > ... > Markup(style.saveResultToString(result)) > In this specific case, `style.saveResultToString(result)` returns a `str` object, which will be converted internally to unicode by the Markup constructor, using the `unicode()` builtin. This is known to be rather fragile. The plugin author should have used the more fool-proof `to_unicode` helper function, from the trac.util.text module. In any case, when migrating to 0.10, I invite plugin authors to have a look at: http://trac.edgewall.org/wiki/TracDev/ApiChanges/0.10 -- Christian --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Trac Users" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/trac-users -~----------~----~----~----~------~----~------~--~---
