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


Groups > comp.lang.python > #92440

Re: Python NBSP DWIM

Path csiph.com!usenet.pasdenom.info!weretis.net!feeder4.news.weretis.net!feeds.phibee-telecom.net!newsfeed.xs4all.nl!newsfeed1a.news.xs4all.nl!xs4all!post.news.xs4all.nl!not-for-mail
Return-Path <rosuav@gmail.com>
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; 'subject:Python': 0.05; 'lines.': 0.07; 'reason,': 0.07; 'width': 0.07; 'pixels': 0.09; 'yeah,': 0.09; 'cc:addr:python-list': 0.10; 'wed,': 0.15; 'file,': 0.15; 'represents': 0.15; 'thu,': 0.15; 'from:addr:rosuav': 0.16; 'from:name:chris angelico': 0.16; 'in-memory': 0.16; 'wrote:': 0.16; 'byte': 0.18; 'pieces': 0.18; "shouldn't": 0.18; 'cc:2**0': 0.21; 'cc:addr:python.org': 0.21; 'space.': 0.22; 'text,': 0.22; 'am,': 0.23; '2015': 0.23; 'player': 0.23; "i've": 0.24; 'header :In-Reply-To:1': 0.24; 'chris': 0.26; 'message- id:@mail.gmail.com': 0.28; 'appear': 0.29; 'looks': 0.29; 'fighting': 0.29; 'character': 0.29; 'no,': 0.29; 'regardless': 0.31; 'file': 0.34; 'received:google.com': 0.34; 'files,': 0.35; 'problem.': 0.35; 'but': 0.36; 'totally': 0.36; 'two': 0.37; 'should': 0.37; 'subject:: ': 0.37; 'takes': 0.39; 'mark': 0.40; 'some': 0.40; 'your': 0.60; 'behavior': 0.61; 'skip:u 10': 0.62; 'media': 0.67; 'letters': 0.67; 'rendering': 0.72; '100%': 0.75; '11:02': 0.84; 'chrisa': 0.84; 'to:none': 0.90; 'notable': 0.91; 'from.': 0.93
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:cc :content-type; bh=L9iaQ0bCXNW319rLW86LNhsvYusVECwC7thFCzJhNQQ=; b=qM58/jd9i3CXDxhkkoQH1XOvGDievJ/xZHuCjAwVUrEBBb9h3wpqqim0HilbePvndE DFYlRJ//jo01retI5bFAdlCweRZtAbo956BkA0Qx9mfacJUp0Fp0a3WfL9eWYaep0r/h xqhLCNuQkIvZ1CpeBLiQVGatue3vcPlWeEEN3FJlHtQtz1hKOO6+ia86fn8bOPK7dQ4r FS/yj2yl53k4anPUsL+fJOd+FtRcOyhxkXgsXBGvx+gXjrTIAW9WHAObopmsei8+3Fq8 otDucmdqtcXIFuczR+BC84DvtDZ4WIaLB3ZT/sT8PUHzim2Nw8BmmBNMDruGJzbVh1kY hq6A==
MIME-Version 1.0
X-Received by 10.107.134.153 with SMTP id q25mr7795861ioi.27.1433984970754; Wed, 10 Jun 2015 18:09:30 -0700 (PDT)
In-Reply-To <1433984536.349589.292410417.0EAD7A6C@webmail.messagingengine.com>
References <20150610082812.2ce887c3@bigbox.christie.dr> <mailman.344.1433946513.13271.python-list@python.org> <55786fd5$0$13003$c3e8da3$5496439d@news.astraweb.com> <CAPTjJmqS-sx2yxrPAcN6iv625hUOQKpM8bqUqBrNfcHvyzm8AQ@mail.gmail.com> <1433984536.349589.292410417.0EAD7A6C@webmail.messagingengine.com>
Date Thu, 11 Jun 2015 11:09:30 +1000
Subject Re: Python NBSP DWIM
From Chris Angelico <rosuav@gmail.com>
Cc "python-list@python.org" <python-list@python.org>
Content-Type text/plain; charset=UTF-8
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.20+
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.373.1433984973.13271.python-list@python.org> (permalink)
Lines 25
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1433984973 news.xs4all.nl 2900 [2001:888:2000:d::a6]:40515
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:92440

Show key headers only | View raw


On Thu, Jun 11, 2015 at 11:02 AM, <random832@fastmail.us> wrote:
>
> On Wed, Jun 10, 2015, at 20:09, Chris Angelico wrote:
> > And U+FEFF "ZERO WIDTH NO-BREAK SPACE", notable because it's also used as
> > the byte-order mark (as its counterpart, U+FFFE, is unallocated). I've
> > been
> > fighting with VLC Media Player over the font it uses for subtitles; for
> > some bizarre reason, that font represents U+FEFF not with zero pixels of
> > emptiness, but with a box containing the letters "ZWN" "BSP" on two
> > lines.
> > Yeah, because that totally takes up zero width and looks like blank
> > space.
>
> As I understand it, the proper behavior is that the ZWNBSP that is the
> byte order mark shall never appear in an in-memory representation of the
> first line of a BOM-encoded file, or any other line of the concatenation
> of two BOM-encoded files, but should "vanish" when the file is opened
> and first read from. So it shouldn't be showing up in your subtitles
> regardless of its rendering behavior.

It's a perfectly valid character for other purposes; it's coming up in
the middle of pieces of text, which should be 100% legal. No, it's a
font problem.

ChrisA

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


Thread

Re: Python NBSP DWIM Skip Montanaro <skip.montanaro@gmail.com> - 2015-06-10 09:28 -0500
  Re: Python NBSP DWIM Steven D'Aprano <steve@pearwood.info> - 2015-06-11 03:11 +1000
    Re: Python NBSP DWIM random832@fastmail.us - 2015-06-10 21:02 -0400
    Re: Python NBSP DWIM Chris Angelico <rosuav@gmail.com> - 2015-06-11 11:09 +1000
    Re: Python NBSP DWIM Steven D'Aprano <steve@pearwood.info> - 2015-06-11 12:26 +1000
      Re: Python NBSP DWIM Chris Angelico <rosuav@gmail.com> - 2015-06-11 13:05 +1000
        Re: Python NBSP DWIM Steven D'Aprano <steve@pearwood.info> - 2015-06-11 13:27 +1000
          Re: Python NBSP DWIM Chris Angelico <rosuav@gmail.com> - 2015-06-11 13:37 +1000
      Re: Python NBSP DWIM random832@fastmail.us - 2015-06-10 23:18 -0400
      Re: Python NBSP DWIM Chris Angelico <rosuav@gmail.com> - 2015-06-11 13:28 +1000

csiph-web