Path: csiph.com!usenet.pasdenom.info!news.albasani.net!rt.uk.eu.org!newsfeed.xs4all.nl!newsfeed1.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail Return-Path: X-Original-To: python-list@python.org Delivered-To: python-list@mail.python.org X-Spam-Status: OK 0.006 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'encoded': 0.07; 'indicating': 0.07; 'bytes.': 0.09; 'whatever.': 0.09; 'width': 0.09; '(note,': 0.16; 'ebcdic': 0.16; 'exists,': 0.16; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'mark,': 0.16; 'safely.': 0.16; 'followed': 0.16; 'wrote:': 0.18; 'wed,': 0.18; 'possible,': 0.19; 'error': 0.23; 'byte': 0.24; 'unicode': 0.24; 'non': 0.24; 'header:In-Reply-To:1': 0.27; 'am,': 0.29; 'message-id:@mail.gmail.com': 0.30; 'code': 0.31; '25,': 0.31; 'breaking': 0.31; 'really,': 0.31; 'sep': 0.31; 'file': 0.32; 'text': 0.33; 'raw': 0.33; 'point.': 0.35; 'but': 0.35; 'received:google.com': 0.35; 'there': 0.35; 'doubt': 0.36; 'possible': 0.36; 'subject:?': 0.36; 'error.': 0.37; 'to:addr :python-list': 0.38; 'to:addr:python.org': 0.39; 'space': 0.40; 'such': 0.63; 'manner': 0.72; '100%': 0.77; 'shadow': 0.84; '2013': 0.98 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :content-type; bh=NgFAVF/j+BWEiHw8v3x8ocJLJtKTputiQJ0iN0y/PHE=; b=DoVLP8yjhaVggsMxU6x/NHjLtq/SBxDkp9HWmm88mKCl9+Iu4i2Zmk7XE0/kjDGL0H 23bTrCDq5PLcDkHFSHBaM9/zG4Ezld8U/8uKImprlldZhFT4ZDURtXbYfVLh/PWaPXVo 2DBbd1JORQ11G7ohMAcVepzB29KrGoiKynLPZAPTtyRiCogX1ZKyhvNfWx1u5TkHeaYJ 6RNBHBt3IUpatDn6LjdJTz2eJsRacumPgA9WJ5eo3eBeFVvd4FCapnD/cMAmjkmqePhZ xzPq4wMNTuAfVrs5VsKAYTat4xesq88Hww0zvQ+FvCvxSNFlaqGgpTrFrmJHF+r2iqEV 5Iqw== MIME-Version: 1.0 X-Received: by 10.58.75.18 with SMTP id y18mr22264vev.33.1380061251628; Tue, 24 Sep 2013 15:20:51 -0700 (PDT) In-Reply-To: <35d582cb-130d-484f-a434-554bb52175ac@googlegroups.com> References: <35d582cb-130d-484f-a434-554bb52175ac@googlegroups.com> Date: Wed, 25 Sep 2013 08:20:51 +1000 Subject: Re: removing BOM prepended by codecs? From: Chris Angelico To: python-list@python.org Content-Type: text/plain; charset=ISO-8859-1 X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: Lines: 20 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1380061254 news.xs4all.nl 15942 [2001:888:2000:d::a6]:51024 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:54717 On Wed, Sep 25, 2013 at 4:43 AM, wrote: > - The *mark* (once the Unicode.org terminology in FAQ) indicating > a unicode encoded raw text file is neither a byte order mark, > nor a signature, it is an encoded code point, the encoded > U+FEFF, 'ZERO WIDTH NO-BREAK SPACE', code point. (Note, a > non breaking space at the start of a text is a non sense.) > > - When such a mark exists, it is always possible to work > 100% safely. No possible error. I have a file encoded in Latin-1 which begins with LATIN SMALL LETTER Y WITH DIAERESIS followed by LATIN SMALL LETTER THORN. I also have a file encoded in EBCDIC (okay, I don't really, but let's pretend) that begins with the same bytes. But of course, when such a mark exists, there is no possible error - of that there is no manner of doubt, no possible, probable shadow of doubt, no possible doubt whatever. ("No possible doubt whatever.") ChrisA