[Python-Dev] Quick sum up about open() + BOM
fuzzyman at voidspace.org.uk
Sat Jan 9 01:14:39 CET 2010
On 09/01/2010 00:09, Antoine Pitrou wrote:
> Hello Victor,
> Victor Stinner<victor.stinner<at> haypocalc.com> writes:
>> (1) Change default open() behaviour or make it optional?
>> Antoine would like to check BOM by default, because both options (system
>> locale vs checking for BOM) is the same thing.
> To be clear, I am not saying it is the same thing. What I think is that it would
> be a mistake to use a mildly unreliable heuristic by default (the locale +
> device encoding heuristic) but refuse to trust a more reliable heuristic (the
> BOM-based detection algorithm).
I concur. On Windows both UTF-8 and signature are very common, yet the
platform default is the truly awful CP1252.
All the best,
> Python-Dev mailing list
> Python-Dev at python.org
> Unsubscribe: http://mail.python.org/mailman/options/python-dev/fuzzyman%40voidspace.org.uk
More information about the Python-Dev