Created
August 6, 2017 21:40
-
-
Save phoe/ab848568711e2b5a3e35503716cf564c to your computer and use it in GitHub Desktop.
CL: Check which CODE-CHARs do not yield characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun char-check () | |
"Print all codes for which (code-char a) returns nil and return their number. | |
If this returns nonzero, there is a hole in the code-chars, | |
so be careful. | |
If this returns 0, the implementation is effectively | |
NIL-proof in this case. | |
NIL-bearing so far: | |
CCL 1.11-r16635 on Win32, beginning at 55295. 2048 codes (D800-DFFF) under 1114112 have a (code-char code) -> nil. | |
NIL-proof so far: | |
SBCL 1.2.16 on Win32 | |
ECL 16.0 on Win32 | |
ABCL 1.4.0-dev-svn-14845M on Java 1.7 | |
CLISP 2.49 on Linux | |
JSCL 0.3.0 on Chrome" | |
(let ((x 0)) | |
(dotimes (a char-code-limit) | |
(when (null (code-char a)) | |
(format t "~X " a) | |
(incf x))) | |
x)) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment