Mercurial > hg > xemacs-beta
comparison 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 |
comparison
equal
deleted
inserted
replaced
5912:47ffa085a9ad | 5913:1b2fdcc3cc5c |
---|---|
457 (set-unicode-conversion scaron code) | 457 (set-unicode-conversion scaron code) |
458 (Assert (eq code (char-to-unicode scaron))) | 458 (Assert (eq code (char-to-unicode scaron))) |
459 (Assert (eq scaron (unicode-to-char code '(latin-iso8859-2))))) | 459 (Assert (eq scaron (unicode-to-char code '(latin-iso8859-2))))) |
460 finally (set-unicode-conversion scaron initial-unicode)) | 460 finally (set-unicode-conversion scaron initial-unicode)) |
461 (Check-Error args-out-of-range (set-unicode-conversion scaron -10000))) | 461 (Check-Error args-out-of-range (set-unicode-conversion scaron -10000))) |
462 | |
463 (Assert (not (natnump (char-to-unicode (make-char 'japanese-jisx0208 | |
464 34 49)))) | |
465 "checking character with no Unicode mapping treated as such") | |
466 | |
467 (Assert (equal (decode-coding-string | |
468 (encode-coding-string (make-char 'japanese-jisx0208 34 49) | |
469 'utf-8) 'utf-8) | |
470 "\uFFFD") | |
471 "checking REPLACEMENT CHARACTER used correctly") | |
462 | 472 |
463 (dolist (utf-8-char | 473 (dolist (utf-8-char |
464 '("\xc6\x92" ;; U+0192 LATIN SMALL LETTER F WITH HOOK | 474 '("\xc6\x92" ;; U+0192 LATIN SMALL LETTER F WITH HOOK |
465 "\xe2\x81\x8a" ;; U+204A TIRONIAN SIGN ET | 475 "\xe2\x81\x8a" ;; U+204A TIRONIAN SIGN ET |
466 "\xe2\x82\xae" ;; U+20AE TUGRIK SIGN | 476 "\xe2\x82\xae" ;; U+20AE TUGRIK SIGN |