Accentuated characters prevent Trac from rendering the ticket
|Reported by:||Emmanuel Blot||Owned by:||Christian Boos|
For example, if the 'a' character with a accent (I won't submit the actual character here ;-)) is specified in a comment, Trac accepts the character, stores it in the SQL database, but then fails to render it:
Trac detected an internal error: 'ascii' codec can't encode character u'\xe2' in position 0: ordinal not in range(128)
Traceback (most recent call last): File "/local/engine/trac/trac/web/modpython_frontend.py", line 274, in handler dispatch_request(mpr.path_info, mpr, env) File "/local/engine/trac/trac/web/main.py", line 425, in dispatch_request dispatcher.dispatch(req) File "/local/engine/trac/trac/web/main.py", line 285, in dispatch resp = chosen_handler.process_request(req) File "/local/engine/trac/trac/ticket/web_ui.py", line 194, in process_request self._insert_ticket_data(req, db, ticket, reporter_id) File "/local/engine/trac/trac/ticket/web_ui.py", line 379, in _insert_ticket_data changes[-1]['comment'] = wiki_to_html(new, self.env, req, db) File "/local/engine/trac/trac/wiki/formatter.py", line 668, in wiki_to_html Formatter(env, req, absurls, db).format(wikitext, out, escape_newlines) File "/local/engine/trac/trac/wiki/formatter.py", line 557, in format line = util.escape(line, False) File "/local/engine/trac/trac/util.py", line 55, in escape text = str(text).replace('&', '&') \ UnicodeEncodeError: 'ascii' codec can't encode character u'\xe2' in position 0: ordinal not in range(128)
This means that once someone has submitted such a character, the ticket cannot be rendered anymore.
I do not know if this issue also impacts other component (as it seems to occur when Wiki text is rendered)