A RetroSearch Logo

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

Search Query:

Showing content from http://mail.python.org/pipermail/python-dev/2010-January/097172.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 BOMLennart Regebro regebro at gmail.com
Sat Jan 9 23:14:08 CET 2010
On Sat, Jan 9, 2010 at 21:28, Antoine Pitrou <solipsis at pitrou.net> wrote:
> If we want it to be the default, it must be able to fallback on the current
> locale-based algorithm if no BOM is found. I don't think it would be easy for a
> codec to do that.

Right. It seems like encoding=None is the right way to go there.
encoding='BOM' would probably only work if 'BOM' isn't an encoding but
a special tag, which is ugly.

-- 
Lennart Regebro: Python, Zope, Plone, Grok
http://regebro.wordpress.com/
+33 661 58 14 64

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