Ticket #7217 (new defect)
Non-ASCII characters get replaced with '?' in changeset metadata
| Reported by: | anonymous | Owned by: | cboos |
|---|---|---|---|
| Priority: | normal | Milestone: | not applicable |
| Component: | plugin/mercurial | Version: | |
| Severity: | normal | Keywords: | |
| Cc: |
Description
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:
-
tracext/hg/backend.py
27 27 NoSuchChangeset, NoSuchNode 28 28 from trac.wiki import IWikiSyntaxProvider 29 29 30 os.environ['HGENCODING'] = 'utf-8' 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.
Attachments
Change History
Note: See
TracTickets for help on using
tickets.


