Gregory P. Smith <greg <at> krypto.org> writes:

> Given the existing brokenness I personally think that removing the BOM
> insertion (because it is incorrect) in 2.7 and 3.2 is fine if you cannot find
> a way to make it correct in 2.7 and 3.2 without breaking existing APIs.

Thanks for the feedback.
 
> could a private method to create the byte string not be added and used in 2.7
> and 3.2 that correctly add the BOM?

The problem is that given a format string, the code would not know where to
insert the BOM. According to the RFC, it's supposed to go just before the
unstructured message part, but that's format-string and hence
application-dependent. So some new API will need to be exposed, though I haven't
thought through exactly what that will be (for example, it could be a new
place-holder for the BOM in the format-string, or some new public methods which
are meant to be overridden and so not private).

Regards,

Vinay Sajip

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to