Aliasing "Bell" to #\Bel breaks name-char for U+1F514

Bug #1319452 reported by Krzysztof Drewniak
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Fix Released
Undecided
Unassigned

Bug Description

Steps to reproduce:

1. In a REPL, evaluate

(let ((unicode-bell (code-char #x1F514)))
   (char= unicode-bell (name-char (char-name unicode-bell))))

Expected result: The expression returns T, since (char= c (name-char (char-name c)) for all c.

Actual result: The expression returns NIL.

I've attached a patch that removes the "Bell" -> #\Bel alias.

Revision history for this message
Krzysztof Drewniak (krzysdrewniak) wrote :
Revision history for this message
Krzysztof Drewniak (krzysdrewniak) wrote :

Further investigation reveals that evaluating (code-char #x1F514) => #\BELL , but that (char-code #\BELL) is 7. Because of this, (read-from-string (prin1-to-string (code-char #x1F514))) is not equal to (code-char #x1F514). In other words, there's a bug in the reader.

Revision history for this message
Stas Boukarev (stassats) wrote :

In 1825189a64330369f10be389ee62469860ed72d8.

Changed in sbcl:
status: New → Fix Committed
Changed in sbcl:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.