[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Berker Peksag

Berker Peksag added the comment:

Thanks Serhiy.

--
resolution:  -> fixed
stage: commit review -> resolved
status: open -> closed

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Roundup Robot

Roundup Robot added the comment:

New changeset e058423d3ca4 by Berker Peksag in branch 'default':
Issue #2052: Add charset parameter to HtmlDiff.make_file().
https://hg.python.org/cpython/rev/e058423d3ca4

--
nosy: +python-dev

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

LGTM

--
assignee:  -> berker.peksag
stage: patch review -> commit review

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file38484/issue2052_v4.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-14 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file38483/issue2052_v3.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-13 Thread Berker Peksag

Berker Peksag added the comment:

Here is an updated patch. Thanks for the review, Serhiy. I will open a new 
issue for the HTML 5 part of the patch.

--
Added file: http://bugs.python.org/file38474/issue2052_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2015-03-06 Thread Serhiy Storchaka

Serhiy Storchaka added the comment:

May be updating the markup to HTML5 should be different issue. 
issue2052_html5_v2.diff not only adds charset in HTML5 format, it totally 
changes the template. This definitely a separate issue.

--
nosy: +serhiy.storchaka

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2014-07-30 Thread Masato HASHIMOTO

Changes by Masato HASHIMOTO :


--
nosy: +hashimo

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2014-05-17 Thread Berker Peksag

Berker Peksag added the comment:

Attaching a new version of issue2052_html5.diff. Changes:
- Switch from px to em in CSS
- Cleanup markup a bit (e.g. delete redundant colgroup tags)

--
Added file: http://bugs.python.org/file35273/issue2052_html5_v2.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2014-05-13 Thread Berker Peksag

Changes by Berker Peksag :


Added file: http://bugs.python.org/file35245/issue2052_html5.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2014-05-13 Thread Berker Peksag

Berker Peksag added the comment:

Attaching two patches:

issue2052.diff adds a "charset" keyword argument to HtmlDiff.make_file().

issue2052_html5.diff also adds a "charset" keyword argument to 
HtmlDiff.make_file() and updates the markup of HtmlDiff() to HTML5. I tested it 
with Firefox 29 and Chrome 34.

--
keywords: +patch
nosy: +berker.peksag
stage: needs patch -> patch review
versions: +Python 3.5 -Python 3.2
Added file: http://bugs.python.org/file35244/issue2052.diff

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2014-04-19 Thread Senthil Kumaran

Changes by Senthil Kumaran :


--
nosy:  -orsenthil

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2014-02-03 Thread Mark Lawrence

Changes by Mark Lawrence :


--
nosy:  -BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2013-03-20 Thread Ezio Melotti

Ezio Melotti added the comment:

I haven't looked at the code, but if an HTML page is generated it should 
probably be updated to use HTML5 and .

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2013-03-20 Thread Terry J. Reedy

Terry J. Reedy added the comment:

After thinking about it more, the real problem is that the charset setting must 
match the chars used and how they re encoded, so no one setting is right for 
all uses. An alternative to changing the default in existing versions is to at 
least document what it is and explain how to work around it with .replace -- 
for instance output.replace('ISO-8859-1', 'utf-8'). I agree that adding a 
parameter (charset=xxx) is a new feature.

--

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2013-03-19 Thread Terry J. Reedy

Terry J. Reedy added the comment:

In 3.2, it is line 1629:
  content="text/html; charset=ISO-8859-1" />

That charset was only standard for Western European documents limited to that 
charset. Now, even such limited-char docs often use 'utf-8' (python.org does). 
The result of putting an incorrect charset designation in an html file is that 
the browser will not display the file correctly.

For instance, I tried an input sequence containing line 'c\u', which 
displays in IDLE as  'c㌳'. The string from HtmlDill.make_file() must be written 
to a file opened with encoding='utf-8', not the above or equivalent. Firefox 
then reads the three bytes of the utf-8 encoding as three separate characters 
and displays 'c㌳'. To check:
>>> 'c㌳'.encode().decode(encoding='Latin-1')
'cã\x8c³'

To me the clear implication of "returns a string which is a complete HTML file 
containing a table showing line by line differences with inter-line and 
intra-line changes highlighted." is that the resulting file will display 
correctly. The current template charset prevents that, changing to 'utf-8' 
results in a file that displays correctly (tested). So the current behavior and 
the code that causes it is to me clearly a bug. I would like to fix it before 
2.7.4 comes out.

--
nosy: +ezio.melotti, orsenthil, terry.reedy -tim_one

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2010-09-23 Thread R. David Murray

R. David Murray  added the comment:

I believe that charset is the standard default for html, which would make this 
a feature request.

--
assignee: tim_one -> 
nosy: +r.david.murray
stage: unit test needed -> needs patch
type: behavior -> feature request
versions: +Python 3.2 -Python 2.6

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2010-09-20 Thread Mark Lawrence

Mark Lawrence  added the comment:

difflib._file_template is still hard-coded in py3k SVN.  I'm unsure as to 
whether this is a feature request, a behaviour issue or not an issue at all, 
can someone please advise, thanks.

--
nosy: +BreamoreBoy

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2010-01-28 Thread Brian Curtin

Changes by Brian Curtin :


--
stage:  -> test needed
versions: +Python 2.6 -Python 2.5

___
Python tracker 

___
___
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com



[issue2052] Allow changing difflib._file_template character encoding.

2008-03-18 Thread Sean Reifschneider

Changes by Sean Reifschneider <[EMAIL PROTECTED]>:


--
assignee:  -> tim_one
nosy: +tim_one
priority:  -> normal
title: Lack of difflib.HtmlDiff unicode support -> Allow changing 
difflib._file_template character encoding.

__
Tracker <[EMAIL PROTECTED]>

__
___
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com