Marco,


His libraries have definitely been inspirational.  Glad it's working for you!


Best,

Elliott



On 10/15/24 11:28 AM, Marco Antoniotti wrote:
Hi Elliot

yes I am familiar with Saint Edi's (always blessed be his parentheses!) CL-UNICODE.

After a few wrong turns it appears that the incantation you need in Lispworks to make it swallow Unicode names is


(eval-when (:load-toplevel :compile-toplevel :execute)
  (cl-unicode:enable-alternative-character-syntax)
  (setf cl-unicode:*try-lisp-names-p* t)
  )

You need both, otherwise you get funny errors like #\= is not a character.

Unicode names with spaces can be read using an underscore in their place.

CL-USER 16 > #\LATIN_SMALL_LETTER_E_GRAVE
#\è



All the best

MA


Marco


On Mon, Oct 14, 2024 at 6:02 AM Elliott Johnson <elliott@elliottjohnson.net> wrote:

Hi Marco, SMH, and the rest of the list,


I assume you are familiar with Edi Weitz's CL-UNICODE:

    "It also provides the ability to replace the standard syntax for reading Lisp characters with one that is Unicode-aware and is used to enhance CL-PPCRE with Unicode properties"

    http://edicl.github.io/cl-unicode/#enable-alternative-character-syntax


I would hope that it would allow for some level of portable code.


Cheers,

Elliott


On 10/13/24 10:48 AM, Marco Antoniotti 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