[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: lisp/term/ns-win.el modification
From: |
Clément Pit-Claudel |
Subject: |
Re: lisp/term/ns-win.el modification |
Date: |
Sun, 30 Apr 2017 11:06:08 -0400 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101 Thunderbird/45.8.0 |
On 2017-04-30 10:12, Eli Zaretskii wrote:
>> From: Jean-Christophe Helary <address@hidden>
>> Date: Sun, 30 Apr 2017 15:41:45 +0900
>>
>>> Besides, it doesn't trim non-breakable spaces.
>>
>> That's a pity. Is there a reason why non-breakable spaces would not be
>> considered for trimming purposes?
>
> What's the rationale for adding NBSP? Also, is it only the NBSP
> character that's missing, or there are others?
Possibly for consistency with other languages. Here's what Python 3 does:
import sys
import unicodedata
for codepoint in range(sys.maxunicode + 1):
c = chr(codepoint)
if c.strip() == "":
name = unicodedata.name(c, "U+{:04X}".format(codepoint))
print("Python 3 trims {} ({})".format(name, unicodedata.category(c)))
Python 3 trims U+0009 (Cc)
Python 3 trims U+000A (Cc)
Python 3 trims U+000B (Cc)
Python 3 trims U+000C (Cc)
Python 3 trims U+000D (Cc)
Python 3 trims U+001C (Cc)
Python 3 trims U+001D (Cc)
Python 3 trims U+001E (Cc)
Python 3 trims U+001F (Cc)
Python 3 trims SPACE (Zs)
Python 3 trims U+0085 (Cc)
Python 3 trims NO-BREAK SPACE (Zs)
Python 3 trims OGHAM SPACE MARK (Zs)
Python 3 trims EN QUAD (Zs)
Python 3 trims EM QUAD (Zs)
Python 3 trims EN SPACE (Zs)
Python 3 trims EM SPACE (Zs)
Python 3 trims THREE-PER-EM SPACE (Zs)
Python 3 trims FOUR-PER-EM SPACE (Zs)
Python 3 trims SIX-PER-EM SPACE (Zs)
Python 3 trims FIGURE SPACE (Zs)
Python 3 trims PUNCTUATION SPACE (Zs)
Python 3 trims THIN SPACE (Zs)
Python 3 trims HAIR SPACE (Zs)
Python 3 trims LINE SEPARATOR (Zl)
Python 3 trims PARAGRAPH SEPARATOR (Zp)
Python 3 trims NARROW NO-BREAK SPACE (Zs)
Python 3 trims MEDIUM MATHEMATICAL SPACE (Zs)
Python 3 trims IDEOGRAPHIC SPACE (Zs)
Clément.
- Re: lisp/term/ns-win.el modification, (continued)
- Re: lisp/term/ns-win.el modification, Davis Herring, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27
- Re: lisp/term/ns-win.el modification, Anders Lindgren, 2017/04/29
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/29
- Re: lisp/term/ns-win.el modification, Anders Lindgren, 2017/04/30
- Re: lisp/term/ns-win.el modification, Noam Postavsky, 2017/04/30
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/30
- Re: lisp/term/ns-win.el modification, Eli Zaretskii, 2017/04/30
- Re: lisp/term/ns-win.el modification,
Clément Pit-Claudel <=
- Re: lisp/term/ns-win.el modification, Eli Zaretskii, 2017/04/30
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/30
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/30
- Re: lisp/term/ns-win.el modification, Noam Postavsky, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27
- Re: lisp/term/ns-win.el modification, mituharu, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27
- Re: lisp/term/ns-win.el modification, mituharu, 2017/04/27
- Re: lisp/term/ns-win.el modification, Jean-Christophe Helary, 2017/04/27