As list administrator, your authorization is requested for the
following mailing list posting:
List: armedbear-devel@common-lisp.net
From: ale2014.zamora@gmail.com
Subject: Re: Associating names with characters for named Unicode characters
The message is being held because:
The message is larger than the 40 KB maximum size
At your convenience, visit your dashboard to approve or deny the
request.
From: Alejandro Zamora Fonseca <ale2014.zamora@gmail.com>
Subject: Re: Associating names with characters for named Unicode characters
Date: January 3, 2024 at 21:25:21 GMT+1
To: Robert Dodier <robert.dodier@gmail.com>
Cc: Armed Bear <armedbear-devel@common-lisp.net>
Hi Robert
Probably not completely related but I made a small library to handle with Unicode details with ABCL
https://github.com/alejandrozf/abcl-utils
Maybe that might help you in the association you want to make.
Best,
Alejandro
Hi, I wonder if there is a way to associate a name with a character at
run time in ABCL.
I am interested in working with Unicode characters which have names,
e.g. BOX DRAWINGS LIGHT HORIZONTAL and others listed in the document
at: https://www.unicode.org/charts/PDF/U2500.pdf
I am thinking it would be great if I could refer to such characters by
name, e.g.: #\BOX_DRAWINGS_LIGHT_HORIZONTAL. It appears that such
names are not defined in ABCL; I'm looking for a way to define them at
run time.
>From looking at the source code, maybe it's possible via the
setCharName static method in org.armedbear.lisp.LispCharacter.
However, when I try to get a reference to setCharName, I get an error:
CL-USER(10): (java:jstatic "setCharName" "org.armedbear.lisp.LispCharacter")
#<THREAD "interpreter" native {48616CA1}>: Debugger invoked on
condition of type ERROR
No such static method: org.armedbear.lisp.LispCharacter.setCharName()
I thought maybe the problem there is that setCharName isn't declared
public, but I tried the same operation with a declared public static
method and I get the same error:
CL-USER(12): (java:jstatic "getInstance" "org.armedbear.lisp.LispCharacter")
#<THREAD "interpreter" native {48616CA1}>: Debugger invoked on
condition of type ERROR
No such static method: org.armedbear.lisp.LispCharacter.getInstance()
so maybe I am not going about that correctly.
setCharName modifies the lookup table
org.armedbear.lisp.LispCharacter.lispChars -- I'm sure it's not
recommended, but maybe I can put new entries into it directly; can
someone give me a hint as to the appropriate incantation in Lisp?
lispChars is declared public static so it seems like it should be
possible, if I can craft the appropriate method call to
org.armedbear.lisp.CharHashMap.put.
Thanks for any info,
Robert