I'm trying to create a hashtable in Common Lisp to store characters as keys, but the hashtable doesn't work if I use accented characters. It only takes one possible key with accents.
In this example I add 5 keys, and see that the hashtable shows 5 elements, then add another 5 with accents, and the table shows 6 elements, then add another “normal” 5 elements and the size goes to 11 (as expected).
What is happening? And how can I solve this?
(defparameter *h* (make-hash-table))
(setf (gethash #\A *h*) #\A)
(setf (gethash #\E *h*) #\A)
(setf (gethash #\I *h*) #\A)
(setf (gethash #\O *h*) #\A)
(setf (gethash #\U *h*) #\A)
(hash-table-count *h*)
(setf (gethash #\á *h*) #\A)
(setf (gethash #\é *h*) #\A)
(setf (gethash #\í *h*) #\A)
(setf (gethash #\ó *h*) #\A)
(setf (gethash #\ú *h*) #\A)
(hash-table-count *h*)
(setf (gethash #\a *h*) #\A)
(setf (gethash #\e *h*) #\A)
(setf (gethash #\i *h*) #\A)
(setf (gethash #\o *h*) #\A)
(setf (gethash #\u *h*) #\A)
(hash-table-count *h*)