Modify ↓
Ticket #8180 (new defect)
Bad encoding in mercurial plugin
| Reported by: | davojan@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | high | Milestone: | plugin - mercurial |
| Component: | plugin/mercurial | Version: | none |
| Severity: | major | Keywords: | unicode |
| Cc: |
Description
In browse source I got an error UnicodeDecodeError: 'ascii' codec can't decode byte 0xd0 in position 23: ordinal not in range(128) (see attached screenshot).
I've fixed the bug by changing tracext/hg/backend.py:647:
if f.startswith(d):
to
if unicode(f, "utf-8").startswith(d):
Attachments
Change History
Changed 17 months ago by davojan@…
- attachment trac-hg-bug.png added
comment:1 Changed 17 months ago by cboos
- Keywords unicode added
- Milestone set to not applicable
Thanks for the report.
For the fix, I'd rather change convert [dir,] from utf-8 to the encoding used for the repository file names (see #7799 and ticket:7160#comment:5).
Changed 10 months ago by kim@…
- attachment tracext-hg-backend.py.diff added
Small hack that made it work for me
Changed 7 months ago by anonymous
- attachment tracext-hg-backend.py.latin-1.diff added
This one worked for me
Note: See
TracTickets for help on using
tickets.



Bug illustration