James G. sack (jim) <[EMAIL PROTECTED]> added the comment:

> Can you post an example that requires this code?

This is not a big issue, and it wouldn't hurt if it got declared "go away 
and come back later if you have patch, test, docs, and a convincing use 
case". 

..But, for the record..

Suppose I want to both read and write some utf8. It is unknown whether the 
input has a BOM, but it is known to be utf8. I want to write utf8 without 
any BOM. I see two options, which I find slightly ugly/annoying/error-prone:

a) Use 2 separate encodings: read via utf_8_sig so as to transparently 
accept input with/without BOM; use utf_8 on output to not emit any BOM. 

b) Use utf_8 for read and write and explicitly check for and discard 
leading BOM on input if any.

What _I_ would prefer is that utf_8 would ignore a BOM, if present (just 
like utf_8_sig). 

(What I was talking about in my last post was a complication in 
consideration of someone else who would prefer otherwise, or of code that 
might break upon my change.)

Regards,
..jim

__________________________________
Tracker <[EMAIL PROTECTED]>
<http://bugs.python.org/issue1328>
__________________________________
_______________________________________________
Python-bugs-list mailing list 
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to