Ticket #999 (closed enhancement: fixed)

Opened 12 years ago

Last modified 12 years ago

Support for diffs of UTF-8 encoded files

Reported by: Owned by: solj
Priority: minor Milestone: Bcfg2 1.2.0 Release
Component: bcfg2-client Version: 1.0
Keywords: Cc:


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).


Change History

comment:1 Changed 12 years ago by solj

Looks like this may be a python limitation:

comment:2 Changed 12 years ago by

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.


Add a comment

Modify Ticket

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

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

Note: See TracTickets for help on using tickets.