[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Character literals for Unicode (control) characters

From: Philipp Stephani
Subject: Re: Character literals for Unicode (control) characters
Date: Sat, 05 Mar 2016 15:28:22 +0000

Paul Eggert <address@hidden> schrieb am Do., 3. März 2016 um 17:11 Uhr:
On 03/02/2016 09:47 PM, Lars Ingebrigtsen wrote:
> And then I thought -- well, if we should have a literal syntax for
> Unicode control characters, why not for all of them?
Something like that would make sense. The escape sequence should bracket
the name, so that the escape sequences could be used in strings without
ambiguity. Something like \u[NAME], say.

I'd still prefer to use characters as-is in strings if they're
displayable, e.g., the Lisp string:

"Use Greek capital letters (Α–Ω) to denote figures."

is more readable than:

"Use Greek capital letters (\u[GREEK CAPITAL LETTER ALPHA]\u[EN
DASH]\u[GREEK CAPITAL LETTER OMEGA]) to denote figures."

But for undisplayable or hard-to-read characters the escape sequence
would be a win.

More issues: should we insist on the full official name? should we allow
obsolescent aliases? lower-case instead of upper case? initial prefixes
of names?

We should probably do whatever Perl does (http://perldoc.perl.org/charnames.html). I haven't checked in detail what is allowed by Perl (except that it allows \N{name} and \N{U+code}), but it would be simpler to just adopt Perl's behavior (to a reasonable extend) than trying to come up with our own syntax.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]