Python NBSP DWIM

Chris Angelico rosuav at gmail.com
Wed Jun 10 20:09:30 EDT 2015


On Thu, Jun 11, 2015 at 3:11 AM, Steven D'Aprano <steve at pearwood.info>
wrote:
> (Oh, and for the record, there are at least two non-breaking spaces in
> Unicode, U+00A0 "NO-BREAK SPACE" and U+202F "NARROW NO-BREAK SPACE".)
>
> http://www.unicode.org/charts/PDF/U0080.pdf
> http://www.unicode.org/charts/PDF/U2000.pdf

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.

ChrisA
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20150611/c5da01d8/attachment.html>


More information about the Python-list mailing list