[Python-Dev] Possible change to logging.handlers.SysLogHandler
Vinay Sajip
vinay_sajip at yahoo.co.uk
Wed Apr 11 05:05:48 CEST 2012
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
More information about the Python-Dev
mailing list