Mercurial > hg > xemacs-beta
diff tests/automated/mule-tests.el @ 5913:1b2fdcc3cc5c
Remove an old, buggy attempt to preserve East Asian chars, encode_unicode_char
src/ChangeLog addition:
2015-05-11 Aidan Kehoe <kehoea@parhasard.net>
* unicode.c (encode_unicode_char):
If we have no information on the Unicode mapping of a character,
write U+FFFD unconditionally. Remove an old, incomplete,
inappropriate attempt to preserve certain East Asian characters.
tests/ChangeLog addition:
2015-05-11 Aidan Kehoe <kehoea@parhasard.net>
* automated/mule-tests.el:
Assert that a character which we know has no Unicode mapping is
represented as REPLACEMENT CHARACTER in UTF-8, rather than as a
character corresponding to a very large codepoint.
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Mon, 11 May 2015 18:04:58 +0100 |
parents | 15041705c196 |
children |
line wrap: on
line diff
--- a/tests/automated/mule-tests.el Sun May 10 23:55:41 2015 +0100 +++ b/tests/automated/mule-tests.el Mon May 11 18:04:58 2015 +0100 @@ -460,6 +460,16 @@ finally (set-unicode-conversion scaron initial-unicode)) (Check-Error args-out-of-range (set-unicode-conversion scaron -10000))) + (Assert (not (natnump (char-to-unicode (make-char 'japanese-jisx0208 + 34 49)))) + "checking character with no Unicode mapping treated as such") + + (Assert (equal (decode-coding-string + (encode-coding-string (make-char 'japanese-jisx0208 34 49) + 'utf-8) 'utf-8) + "\uFFFD") + "checking REPLACEMENT CHARACTER used correctly") + (dolist (utf-8-char '("\xc6\x92" ;; U+0192 LATIN SMALL LETTER F WITH HOOK "\xe2\x81\x8a" ;; U+204A TIRONIAN SIGN ET