Non-ASCII characters get replaced with '?' in changeset metadata
|Reported by:||anonymous||Owned by:||Christian Boos|
|Priority:||high||Milestone:||plugin - mercurial|
With TracMercurial, non-ASCII characters in changeset metadata strings get replaced with question marks. The plugin should set
os.environ['HGENCODING'] = 'utf-8'.
I think in actuality this behavior can vary depending on the locale that Trac is running with, but I think it should just use UTF-8 regardless, since the plugin seems to expect that anyway (with calls to
to_unicode(), which tries to decode from UTF-8 by default).
I'm not sure where exactly in the code it should set this, but this works for me, at least:
27 27 NoSuchChangeset, NoSuchNode 28 28 from trac.wiki import IWikiSyntaxProvider 29 29 30 31 30 32 try: 31 33 # The new `demandimport` mechanism doesn't play well with code relying 32 34 # on the `ImportError` exception being caught.
Change History (14)
comment:4 by , 13 years ago
|Milestone:||not applicable → mercurial-plugin|
|Priority:||normal → high|