Feb. 12, 2012
4:34 a.m.
On Sun, Feb 12, 2012 at 9:24 AM, Paul Moore <p.f.moore@gmail.com> wrote:
Saying "it's bytes" is even more of a lie than "it's latin-1". The honest truth is "it's an ASCII superset", and that's all I need to know to do the job manually, so I'd like to write code to do the same job without needing to lie about what I know. I'm now 100% convinced that encoding="ascii",errors="surrogateescape" is the way to say this in code.
I created http://bugs.python.org/issue13997 to suggest codifying this explicitly as an open_ascii() builtin. Cheers, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia