Modify

Ticket #999 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Support for diffs of UTF-8 encoded files

Reported by: https://www.google.com/accounts/o8/id?id=AItOawlJa6QJcUnwqaUiOAgop4U4wANp_y0hDu4 Owned by: solj
Priority: minor Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:

Description

It would be great if the bcfg2-client could print the differences of UTF-8 encoded files (now it only shows the diff of ascii files).

Attachments

Change History

comment:1 Changed 12 years ago by solj

Looks like this may be a python limitation: http://bugs.python.org/issue2052

comment:2 Changed 12 years ago by https://www.google.com/accounts/o8/id?id=AItOawlJa6QJcUnwqaUiOAgop4U4wANp_y0hDu4

I think that it's not a difflib limitation:

[email protected]:~$ python
Python 2.6.5 (r265:79063, Apr 16 2010, 13:57:41) 
[GCC 4.4.3] on linux2
Type "help", "copyright", "credits" or "license" for more information.
>>> import difflib
>>> a = """á
... é
... í
... """
>>> b = """á
... e
... i
... """
>>> diff = difflib.ndiff(a.split('\n'), b.split('\n'))
>>> print '\n'.join(diff)
  á
- é
- í
+ e
+ i

comment:3 Changed 12 years ago by solj

  • Owner changed from desai to solj
  • Status changed from new to accepted
  • Milestone set to Bcfg2 1.2.0 Release

comment:4 Changed 12 years ago by solj

  • Status changed from accepted to closed
  • Resolution set to fixed

Fixed by Holger Weiß in 8c497c815589c7c5878490df7661c6f5d3330829.

WARNING! You need to establish a session before you can create or edit tickets. Otherwise the ticket will get treated as spam.

View

Add a comment

Modify Ticket

Change Properties
<Author field>
Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


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

 
Note: See TracTickets for help on using tickets.