A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2010-January/097127.html below:

[Python-Dev] Improve open() to support reading file starting with an unicode BOM

[Python-Dev] Improve open() to support reading file starting with an unicode BOM [Python-Dev] Improve open() to support reading file starting with an unicode BOMAntoine Pitrou solipsis at pitrou.net
Fri Jan 8 17:03:07 CET 2010
Guido van Rossum <guido <at> python.org> writes:
> 
> > Well, I think if we implement this the default behaviour *should* be changed.
> > It looks a bit senseless to have two different "auto-choose" options, one
with
> > encoding=None and one with encoding="BOM".
> 
> Well there *are* two different auto options: use the environment
> variables (LANG etc.) or inspect the contents of the file. I think it
> would be useful to have ways to specify both.

Yes, perhaps. In the context of open() however I think it would be helpful to
change the default.
Moreover, reading the BOM is certainly much more reliable than our current
guessing based on the locale or the "device encoding".

Regards

Antoine.



More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4