Re: Associating names with characters for named Unicode characters
Alejandro Zamora Fonseca <[email protected]> Wed, 3 Jan 2024 18:13:33 -0300
| Newsgroups | gmane.editors.j.devel |
|---|---|
| Message-ID | <CANfGzZwSoSgHE1JWKMgqWYD2iRhoWmpPFCH43_BJukH0kT+nYg__710.045550816574$1704316472$gmane$org@mail.gmail.com> |
--00000000000010d256060e1117ef Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable Now this is rudimentary but it works Probably with more time can be improved ABCL-UTILS> (defun unicode-converter (stream char) (declare (ignore char)) (code-char (abcl-utils:name->codepoint (symbol-name (read stream t nil t))))) UNICODE-CONVERTER ABCL-UTILS> (set-macro-character #\? #'unicode-converter) T ABCL-UTILS> ?:|BOX DRAWINGS LIGHT HORIZONTAL| #\=E2=94=80 ABCL-UTILS> El mi=C3=A9, 3 ene 2024 a las 17:31, Robert Dodier (<[email protected]= m>) escribi=C3=B3: > Alejandro, thanks a lot for your reply. > > Is there a way, in abcl-utils, to inform the Lisp reader to recognize > named characters such as #\BOX_DRAWINGS_LIGHT_HORIZONTAL in source > code? That is the ultimate goal I am seeking. > > best, > > Robert > --00000000000010d256060e1117ef Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">Now this is rudimentary but it works<div><br></div><div>Pr= obably with more time can be improved</div><div><br></div>ABCL-UTILS> (d= efun unicode-converter (stream char)<br>=C2=A0 (declare (ignore char))<br>= =C2=A0 (code-char (abcl-utils:name->codepoint (symbol-name (read stream = t nil t)))))<br>UNICODE-CONVERTER<br>ABCL-UTILS> (set-macro-character #\= ? #'unicode-converter)<br>T<br>ABCL-UTILS> ?:|BOX DRAWINGS LIGHT HOR= IZONTAL|<br>#\=E2=94=80<br><div>ABCL-UTILS>=C2=A0</div></div><br><div cl= ass=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">El mi=C3=A9, 3 en= e 2024 a las 17:31, Robert Dodier (<<a href=3D"mailto:robert.dodier@gmai= l.com">[email protected]</a>>) escribi=C3=B3:<br></div><blockquote= class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left-width:= 1px;border-left-style:solid;border-left-color:rgb(204,204,204);padding-left= :1ex">Alejandro, thanks a lot for your reply.<br> <br> Is there a way, in abcl-utils, to inform the Lisp reader to recognize<br> named characters such as #\BOX_DRAWINGS_LIGHT_HORIZONTAL in source<br> code? That is the ultimate goal I am seeking.<br> <br> best,<br> <br> Robert<br> </blockquote></div> --00000000000010d256060e1117ef--