Modify ↓
Opened 17 years ago
Closed 17 years ago
#6890 closed defect (fixed)
MacroList can't display with non-ascii(i.e. Japanese) characters.
Reported by: | Owned by: | osimons | |
---|---|---|---|
Priority: | normal | Milestone: | 0.11 |
Component: | wiki system | Version: | 0.11b1 |
Severity: | minor | Keywords: | |
Cc: | Branch: | ||
Release Notes: | |||
API Changes: | |||
Internal Changes: |
Description
I tried to fix it, and here is the patch for source:trunk/trac/wiki/macros.py@6472
-
macros.
old new 460 460 if content and macro_name != content: 461 461 continue 462 462 try: 463 descr = macro_provider.get_macro_description(macro_name)463 descr = unicode(macro_provider.get_macro_description(macro_name), 'utf-8') 464 464 descr = format_to_html(self.env, formatter.context, 465 465 descr or '') 466 466 except Exception, e:
Attachments (0)
Change History (3)
follow-up: 2 comment:1 by , 17 years ago
Component: | i18n → wiki |
---|---|
Milestone: | → 0.11.1 |
Owner: | changed from | to
comment:2 by , 17 years ago
Replying to osimons:
Thanks osimons.
OK. I patched it and use !MacroList macro.
So, It completely worked.
Now you can commit it. Thank you!
comment:3 by , 17 years ago
Milestone: | 0.11.1 → 0.11 |
---|---|
Resolution: | → fixed |
Status: | new → closed |
Committed in [6612].
Note:
See TracTickets
for help on using tickets.
Basically it is the responisbility of the macro to provide a unicode string as this can be used for many purposes other than just the
[[MacroList]]
macro.Here is a patch for the Trac default macros that I'll commit - it will fix it if the macro you use inherits from
WikiMacroBase
, and for others it will illustrate the explicity need to return unicode:trac/wiki/macros.py
inspect.getdoc(self.__class__)If your problematic macro inherits from
WikiMacroBase
, you could perhaps also verify the patch before I commit?