Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #64116

Re: Guessing the encoding from a BOM

References <CAPTjJmqyO0UHrq31510iNeoQ2TcrJnosV0A6oHQOt5i-gz3njA@mail.gmail.com> <1389901049.40172.YahooMailBasic@web163804.mail.gq1.yahoo.com>
Date 2014-01-17 11:14 +1100
Subject Re: Guessing the encoding from a BOM
From Chris Angelico <rosuav@gmail.com>
Newsgroups comp.lang.python
Message-ID <mailman.5612.1389917661.18130.python-list@python.org> (permalink)

Show all headers | View raw


On Fri, Jan 17, 2014 at 6:37 AM, Albert-Jan Roskam <fomcl@yahoo.com> wrote:
> Can you elaborate on that? Unless your utf-8 files will only contain ascii characters I do not understand why you would not want a bom utf-8.

It's completely unnecessary, and could cause problems (the BOM is
actually whitespace, albeit zero-width, so it could effectively indent
the first line of your source code).  UTF-8 specifies the byte order
as part of the protocol, so you don't need to mark it.

ChrisA

Back to comp.lang.python | Previous | Next | Find similar | Unroll thread


Thread

Re: Guessing the encoding from a BOM Chris Angelico <rosuav@gmail.com> - 2014-01-17 11:14 +1100

csiph-web