From: Chris Hanson Date: Sat, 11 Feb 2017 04:54:35 +0000 (-0800) Subject: Character case mappers should preserve the bits. X-Git-Tag: mit-scheme-pucked-9.2.12~220^2~149 X-Git-Url: https://birchwood-abbey.net/git?a=commitdiff_plain;h=e3ceab5f29702e298b48a7c9574d74bfffd745ef;p=mit-scheme.git Character case mappers should preserve the bits. --- 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.