In my opinion ANSI CL would'a could'a should'a standardized on Unicode (at
least the 8 and/or 16-bit ranges) except that Unicode was not available
yet.  Since virtually the entire computing universe has since standardized
on Unicode, it would be insane to do anything else if an updated CL
standard could somehow be established.  Since Unicode standardizes all
character names, CHAR-NAME and NAME-CHAR should be defined to use those
standard names, described here in Wikipedia
<https://en.wikipedia.org/wiki/Unicode_character_property#Name_and_alias>.
The only obvious ugliness from the perspective of CL is that a char name
really wants to be something the reader will swallow as a string
designator, but standard Unicode names can and do contain spaces and
hyphens (but not underscores).  An obvious solution is that CL would
translate space into underscore inside char names.  (This is what Allegro
does.)  One could also escape spaces with backslash, but that is unbearably
ugly: *#\Latin\ Capital\ letter\ A* .  Unfortunately, the current ANS gives
implementations freedom not to support names for graphic (printing) chars.
That should also be reconsidered in a revised Unicode-cognizant standard.

On Sun, Oct 13, 2024 at 1:54 PM Antoni Grzymała <ant...@grzymala.info>
wrote:

> It does work in ECL, too. Does not in ABCL.
>
> Don’t have other impls handy at the moment to check.
>
> On 13 Oct 2024, at 22:48, Marco Antoniotti <marco.antonio...@unimib.it>
> wrote:
>
> Yep.  "It works in SBCL".  I think I wrote a rant about it on my blog some
> time ago.
>
> Cheers
>
> MA
>
>
> On Sun, Oct 13, 2024 at 10:39 PM Antoni Grzymała <ant...@grzymala.info>
> wrote:
>
>> I always thought these names were standardised within the Unicode
>> standard, for example:
>>
>> "LATIN CAPITAL LETTER U WITH OGONEK” for Ų
>>
>> The rest being a matter of porting these names to symbols, but it’s just
>> replacing spaces with underscores in a CL character literal:
>>
>> #\LATIN_CAPITAL_LETTER_U_WITH_OGONEK
>>
>> [a]
>>
>> PS. both characters work in sbcl, but neither in LispWorks, which I might
>> be running a limited version in my OpusModus environment, though
>>
>> On 13 Oct 2024, at 19:48, Marco Antoniotti <marco.antonio...@unimib.it>
>> wrote:
>>
>>
>> Hello parenthetical crowd
>>
>> Is there a consensus about how to "name" Unicode characters, or every
>> implementation does whatever it likes (thus breaking otherwise perfectly
>> portable code)?
>>
>> Cf., #\INFINITY
>>
>> All the best
>>
>> MA
>>
>> PS Do not even think to use the "hey, it is an implementation-dependent
>> thing" argument!
>>
>>
>> --
>> Marco Antoniotti, Professor                   tel. +39 - 02 64 48 79 01
>> DISCo, University of Milan-Bicocca U14 2043   http://dcb.disco.unimib.it
>> Viale Sarca 336
>> I-20126 Milan (MI) ITALY
>>
>>
>>
>
> --
> Marco Antoniotti, Professor                   tel. +39 - 02 64 48 79 01
> DISCo, University of Milan-Bicocca U14 2043   http://dcb.disco.unimib.it
> Viale Sarca 336
> I-20126 Milan (MI) ITALY
>
>
>

Reply via email to