Closed neil-lindquist closed 6 years ago
If you don't want things to be different then do :try-lisp-names-p nil. Otherwise you still have SBCL: (name-char "^c") => #\Etx ECL: => NIL.
I assumed that since (null (character-named "START OF HEADING" :try-unicode1-names-p nil))
and (null (character-named "U+110000" :try-hex-notation-p t :want-code-point-p t))
were tests, that the expected behavior was to return nil
in those cases.
The documented behavior is to call name-char when TRY-LISP-NAMES-P is T, so that's what is expected. The test should be adjusted.
So, this would be the prefered way to fix the failures? As opposed to my original approach in https://github.com/neil-lindquist/cl-unicode/tree/impl-char-name
Ecl, SBCL and CMU each had failing tests, besides the missing derived properties. They all ended up being related to supporting more names from the
name-char
method. This resulted in names of the formU+XXXX
working even whentry-hex-notation-p
wasnil
, and on CMU, Unicode 1 names working even whentry-unicode1-names-p
wasnil
.This pull requests adjusts the behavior of
character-name
on those platforms to act consistently with all the other platforms, i.e. hex-notation isn't used unlesstry-hex-notation-p
is true and unicode 1 names aren't checked unlesstry-unicode1-names-p
is true.