This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author jgsack
Recipients Rhamphoryncus, doerwalter, ggenellina, jafo, jgsack
Date 2008-03-20.22:21:40
SpamBayes Score 0.083075814
Marked as misclassified No
Message-id <1206051701.68.0.0973039961354.issue1328@psf.upfronthosting.co.za>
In-reply-to
Content
> 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
History
Date User Action Args
2008-03-20 22:21:42jgsacksetspambayes_score: 0.0830758 -> 0.083075814
recipients: + jgsack, doerwalter, jafo, ggenellina, Rhamphoryncus
2008-03-20 22:21:41jgsacksetspambayes_score: 0.0830758 -> 0.0830758
messageid: <1206051701.68.0.0973039961354.issue1328@psf.upfronthosting.co.za>
2008-03-20 22:21:41jgsacklinkissue1328 messages
2008-03-20 22:21:40jgsackcreate