Edgewall Software
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

trac-hg-bug.png (85.7 KB) - added by davojan@… 3 years ago.
Bug illustration
tracext-hg-backend.py.diff (868 bytes) - added by kim@… 2 years ago.
Small hack that made it work for me
tracext-hg-backend.py.latin-1.diff (2.9 KB) - added by anonymous 2 years ago.
This one worked for me

Download all attachments as: .zip

Change History

Changed 3 years ago by davojan@…

Bug illustration

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@…

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

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
View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
to The owner will be changed from cboos. Next status will be 'closed'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.