Modify ↓
#766 closed defect (fixed)
AddComment does not manage Unicode strings
Reported by: | anonymous | Owned by: | Alec Thomas |
---|---|---|---|
Priority: | normal | Component: | AddCommentMacro |
Severity: | normal | Keywords: | unicode |
Cc: | Trac Release: | 0.10 |
Description
In new version of trac 0.10 the management of strings have changed. Now the unicode python class is used. AddComment needs to be updated.
More info:
Attachments (1)
Change History (6)
comment:1 Changed 18 years ago by
comment:2 Changed 18 years ago by
Workaround: If you use utf-8, substitute the following line:
comment = Markup(hdf.getValue("args.addcomment", "")).unescape()
by
comment = Markup(unicode(hdf.getValue("args.addcomment", ""), 'utf-8')).unescape()
comment:3 Changed 18 years ago by
Correction also needs to be done on the authname and authoraddcomment values.
See patched attached.
comment:4 Changed 17 years ago by
Resolution: | → fixed |
---|---|
Status: | new → closed |
(In [2817]) AddCommentMacro: Fixing some unicode issues with 0.10 version.
Fixes #766
comment:5 Changed 4 years ago by
Keywords: | 0.10 removed |
---|
Note: See
TracTickets for help on using
tickets.
Error messages:
and in
trac-env/log/trac.log
: {{{2006-10-05 10:30:30,821 Trac[formatter] ERROR: Macro AddComment(None) failed Traceback (most recent call last):UnicodeDecodeError: 'ascii' codec can't decode byte 0xc3 in position 0: ordinal not in range(128) }}}