On Thu, Jan 4, 2024 at 3:11 AM Mark Evenson evenson@panix.com wrote:
or 2) just programmatically call the org.armedbear.lisp.LispCharacter constructor to get a Lisp character?
For 2) why can’t you use CODE-CHAR
Right, I want to call the LispCharacter constructor. CODE-CHAR yields a java.lang.Character, as reported by (java:jcall "getClass" (code-char #xnnnn)), so that's not quite enough.
To back up a little, what I really want is for ABCL to recognize Unicode characters by name, e.g. #\BOX_DRAWINGS_LIGHT_VERTICAL and so on. Towards that end, I believe, perhaps unreasonably, that if I can wedge a new item into LispCharacter.lispChars, then I can call LispCharacter.setCharName, and then -- presto, perhaps -- the reader will recognize #\MY_NEW_NAME.
Then, of course, I'll be able to compile some new code which makes use of those named characters without modifying that code. Some other Lisp implementations recognize those out of the box; at least one needs to have them defined, for which there is an internal Lisp function to do it. It appears it's also possible with ABCL with a little more effort.
Thanks for your help, and all the best.
Robert