﻿id,summary,reporter,owner,description,type,status,priority,component,severity,resolution,keywords,cc,release
801,Encoding problems with strings,jean-baptiste.note@…,hvr,"Hello,

My git commit logs have UTF-8 characters in them (essentially, unbreakable spaces, due to a lingering finger on the alt key in a UTF8 environment). This yields the following error:

Python Traceback

Traceback (most recent call last):
  File ""/usr/lib/python2.4/site-packages/trac/web/main.py"", line 356, in dispatch_request
    dispatcher.dispatch(req)
  File ""/usr/lib/python2.4/site-packages/trac/web/main.py"", line 224, in dispatch
    resp = chosen_handler.process_request(req)
  File ""/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/browser.py"", line 131, in process_request
    self._render_directory(req, repos, node, rev)
  File ""/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/browser.py"", line 156, in _render_directory
    changes = get_changes(self.env, repos, [i['rev'] for i in info])
  File ""/usr/lib/python2.4/site-packages/trac/versioncontrol/web_ui/util.py"", line 47, in get_changes
    shorten=True, absurls=absurls)
  File ""/usr/lib/python2.4/site-packages/trac/wiki/formatter.py"", line 1006, in wiki_to_oneliner
    OneLinerFormatter(env, absurls, db).format(wikitext, out, shorten)
  File ""/usr/lib/python2.4/site-packages/trac/wiki/formatter.py"", line 914, in format
    result = re.sub(self.wiki.rules, self.replace, result)
  File ""sre.py"", line 142, in sub
    return _compile(pattern, 0).sub(repl, string, count)
UnicodeDecodeError: 'ascii' codec can't decode byte 0xc2 in position 5: ordinal not in range(128)

Changing the locale environment variable in apache with SetEnv to be UTF8 does not change anything in the plugin (it does change for python, though, as I had to generate the associated locale before trac could work again). So I resorted to the following hack. I'm a complete python newbie, so i don't know if this makes sense.

Jean-Baptiste",defect,closed,normal,GitPlugin,normal,fixed,,jean-baptiste.note@…,0.10
