Modify ↓
Ticket #8180 (closed defect: duplicate)
Opened 3 years ago
Last modified 7 months ago
Bad encoding in mercurial plugin
| Reported by: | davojan@… | Owned by: | cboos |
|---|---|---|---|
| Priority: | high | Milestone: | |
| Component: | plugin/mercurial | Version: | none |
| Severity: | major | Keywords: | unicode |
| Cc: | |||
| Release Notes: | |||
| API Changes: | |||
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 3 years ago by davojan@…
- Attachment trac-hg-bug.png added
comment:1 Changed 3 years 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 2 years ago by kim@…
- Attachment tracext-hg-backend.py.diff added
Small hack that made it work for me
comment:2 Changed 2 years ago by cboos
- Milestone changed from not applicable to mercurial-plugin
Changed 2 years ago by anonymous
- Attachment tracext-hg-backend.py.latin-1.diff added
This one worked for me
comment:3 Changed 13 months ago by cboos
- Resolution set to duplicate
- Status changed from new to closed
See rather #8538.
comment:4 Changed 7 months ago by rblank
- Milestone plugin - mercurial deleted
Note: See
TracTickets for help on using
tickets.



Bug illustration