diff src/unicode.c @ 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 65d65b52d608
children
line wrap: on
line diff
--- a/src/unicode.c	Sun May 10 23:55:41 2015 +0100
+++ b/src/unicode.c	Mon May 11 18:04:58 2015 +0100
@@ -1966,20 +1966,7 @@
 
   if (code == -1)
     {
-      if (type != UNICODE_UTF_16 &&
-	  XCHARSET_DIMENSION (charset) == 2 &&
-	  XCHARSET_CHARS (charset) == 94)
-	{
-	  unsigned char final = XCHARSET_FINAL (charset);
-
-	  if (('@' <= final) && (final < 0x7f))
-	    code = (0xe00000 + (final - '@') * 94 * 94
-		    + ((h & 127) - 33) * 94 + (l & 127) - 33);
-	  else
-	    code = '?';
-	}
-      else
-	code = '?';
+      code = 0xFFFD;
     }
 #else
   int code = h;