Edgewall Software
Modify

Opened 16 years ago

Closed 16 years ago

#2363 closed defect (fixed)

Broken non-latin diff highlighting

Reported by: vyt@… Owned by: Christian Boos
Priority: normal Milestone: 0.10
Component: version control/changeset view Version: 0.9
Severity: major Keywords:
Cc: vyt@… Branch:
Release Notes:
API Changes:
Internal Changes:

Description

In changeset view diff produced unreadable symbols somewhere. It caused by <del>/<ins> tags, inserted inside symbol. For example Russian symbols coded in UTF-8 in two bytes, and <del> inserted after first byte of symbol and before second byte.

Python string functions like len() and range() (used in hdf_diff()) works with Unicode correct, but not with utf-8.

Attached patch (against trac-0.9 release) changed string representation in hdf_diff() to Unicode and works for me :)

Attachments (4)

trac-0.9-diff_with_unicode.patch (4.1 KB ) - added by vyt@… 16 years ago.
Patch for non-latin diff in changeset view
test.py (238 bytes ) - added by vyt@… 16 years ago.
Demonstration of incorrect work len() with utf-8
trac.diff-broken-hoghlighting.png (27.4 KB ) - added by vyt@… 16 years ago.
Diff with broken highlighting
trac.diff-fixed-hoghlighting.png (29.9 KB ) - added by vyt@… 16 years ago.
Diff with fixed highlighting

Download all attachments as: .zip

Change History (8)

by vyt@…, 16 years ago

Patch for non-latin diff in changeset view

comment:1 by vyt@…, 16 years ago

I think, trac/mimeview/patch.py also have this problem and should be fixed by sharing code from diff.py

by vyt@…, 16 years ago

Attachment: test.py added

Demonstration of incorrect work len() with utf-8

by vyt@…, 16 years ago

Diff with broken highlighting

by vyt@…, 16 years ago

Diff with fixed highlighting

comment:3 by Christian Boos, 16 years ago

Milestone: 0.10
Owner: changed from Jonas Borgström to Christian Boos

#2868 has been marked as a duplicate of this one.

Related to #2905. In particular, the fix I proposed should close those issues.

comment:4 by Christian Boos, 16 years ago

Resolution: fixed
Status: newclosed

Fixed in r3092.

Modify Ticket

Change Properties
Set your email in Preferences
Action
as closed The owner will remain Christian Boos.
The resolution will be deleted. Next status will be 'reopened'.
to The owner will be changed from Christian Boos to the specified user.

Add Comment


E-mail address and name can be saved in the Preferences .
 
Note: See TracTickets for help on using tickets.