[patch] Tagged pages with names containing non-ASCII chars break listing for their tags
|Reported by:||Owned by:||Alec Thomas|
I love to use Trac and the Tag Plugin. As I use different languages for some pages I have pages which have non ascii characters (Umlauts) in some names. If these pages are tagged as well, they break the listing of pages having the same tags.
Create a page named PageWithUmlaut_Ü? with the content
and tag it with
Saving it you get
Error: Macro ListTagged(ReproduceTag) failed asciiPageWithUmlaut_Ü1516ordinal not in range(128)
instead the list of tagged pages.
And as well in [tags?q='ReproduceTag']
Trac detected an internal error: UnicodeEncodeError: 'ascii' codec can't encode character u'\xdc' in position 15: ordinal not in range(128)
This happens in
str() to the unicode id.
Simply removing the
str() fixes the issue
but messes up the sorting of the pages.
I don't understand why the problem occurs in the first place
(and why I get two different error messages).
str() to work on UTF8.
default_charset = utf-8 in the trac.ini didn't help.
Nevertheless I attached the patch.
Change History (6)
comment:4 Changed 7 years ago by
|Summary:||Tagged pages with names containing non ascii characters break the listing for their tags → [Patch] Tagged pages with names containing non ascii characters break the listing for their tags|
|Trac Release:||0.11 → 0.12|
comment:5 Changed 6 years ago by
|Keywords:||unicode added; encoding removed|
|Status:||new → closed|
|Summary:||[Patch] Tagged pages with names containing non ascii characters break the listing for their tags → [patch] Tagged pages with names containing non-ASCII chars break listing for their tags|