From e3ceab5f29702e298b48a7c9574d74bfffd745ef Mon Sep 17 00:00:00 2001 From: Chris Hanson Date: Fri, 10 Feb 2017 20:54:35 -0800 Subject: [PATCH] Character case mappers should preserve the bits. --- src/runtime/char.scm | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/runtime/char.scm b/src/runtime/char.scm index d413d9e7c..fa8ce869d 100644 --- a/src/runtime/char.scm +++ b/src/runtime/char.scm @@ -132,15 +132,18 @@ USA. (define (char-downcase char) (guarantee unicode-char? char 'char-downcase) - (integer->char (ucd-slc-value (char->integer char)))) + (%make-char (ucd-slc-value (char-code char)) + (char-bits char))) (define (char-foldcase char) (guarantee unicode-char? char 'char-foldcase) - (integer->char (ucd-scf-value (char->integer char)))) + (%make-char (ucd-scf-value (char-code char)) + (char-bits char))) (define (char-upcase char) (guarantee unicode-char? char 'char-upcase) - (integer->char (ucd-suc-value (char->integer char)))) + (%make-char (ucd-suc-value (char-code char)) + (char-bits char))) (define-deferred 0-code (char->integer #\0)) ;; Next two codes are offset by 10 to speed up CHAR->DIGIT. -- 2.25.1