classification
Title: Allow changing difflib._file_template character encoding.
Type: enhancement Stage: needs patch
Components: Library (Lib) Versions: Python 3.2
process
Status: open Resolution:
Dependencies: Superseder:
Assigned To: Nosy List: BreamoreBoy, josephoenix, r.david.murray, tim_one
Priority: normal Keywords:

Created on 2008-02-08 21:21 by josephoenix, last changed 2010-09-23 21:11 by r.david.murray.

Messages (5)
msg62208 - (view) Author: (josephoenix) Date: 2008-02-08 21:21
When passed unicode strings, difflib.HtmlDiff.make_file and make_table 
fail with a UnicodeEncodeError. Also, the html outputted by make_file 
seems to be hardcoded to use charset=ISO-8859-1 (line 1584 of difflib.py)
msg62209 - (view) Author: (josephoenix) Date: 2008-02-08 21:34
Oops, please close this. Apparently was fixed in 2.5.1, and I'm just 
behind.
msg62211 - (view) Author: (josephoenix) Date: 2008-02-08 21:51
After installing 2.5.1, the UnicodeEncodeError is gone, but the charset is 
still hardcoded in difflib._file_template. So, I guess this is still a 
separate bug.
msg116949 - (view) Author: Mark Lawrence (BreamoreBoy) Date: 2010-09-20 14:59
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.
msg117234 - (view) Author: R. David Murray (r.david.murray) * (Python committer) Date: 2010-09-23 21:11
I believe that charset is the standard default for html, which would make this a feature request.
History
Date User Action Args
2010-09-23 21:11:26r.david.murraysetnosy: + r.david.murray
versions: + Python 3.2, - Python 2.6
messages: + msg117234

assignee: tim_one ->
type: behavior -> enhancement
stage: test needed -> needs patch
2010-09-20 14:59:10BreamoreBoysetnosy: + BreamoreBoy
messages: + msg116949
2010-01-29 04:40:41brian.curtinsetstage: test needed
versions: + Python 2.6, - Python 2.5
2008-03-18 19:03:06jafosetpriority: normal
assignee: tim_one
nosy: + tim_one
title: Lack of difflib.HtmlDiff unicode support -> Allow changing difflib._file_template character encoding.
2008-02-08 21:51:40josephoenixsetmessages: + msg62211
2008-02-08 21:34:08josephoenixsetmessages: + msg62209
2008-02-08 21:21:53josephoenixcreate