changeset 22717:3e3949ac4cfb

(DECODE_ISO_CHARACTER): While decoding two-byte code, if the sencond byte is invalid, produce the first byte as is.
author Kenichi Handa <handa@m17n.org>
date Thu, 09 Jul 1998 02:02:33 +0000
parents 2d00337b7152
children 821fecd82623
files src/coding.c
diffstat 1 files changed, 4 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/coding.c	Thu Jul 09 02:02:33 1998 +0000
+++ b/src/coding.c	Thu Jul 09 02:02:33 1998 +0000
@@ -884,21 +884,21 @@
 	  *dst++ = 0xFF;						\
 	coding->composing += 2;						\
       }									\
-    if ((charset) >= 0)							\
+    if (charset_alt >= 0)						\
       {									\
-	if (CHARSET_DIMENSION (charset) == 2)				\
+	if (CHARSET_DIMENSION (charset_alt) == 2)			\
 	  {								\
 	    ONE_MORE_BYTE (c2);						\
 	    if (iso_code_class[(c2) & 0x7F] != ISO_0x20_or_0x7F		\
 		&& iso_code_class[(c2) & 0x7F] != ISO_graphic_plane_0)	\
 	      {								\
 		src--;							\
-		c2 = ' ';						\
+		charset_alt = CHARSET_ASCII;				\
 	      }								\
 	  }								\
 	if (!NILP (translation_table)					\
 	    && ((c_alt = translate_char (translation_table,		\
-					 -1, (charset), c1, c2)) >= 0))	\
+					 -1, charset_alt, c1, c2)) >= 0)) \
 	  SPLIT_CHAR (c_alt, charset_alt, c1, c2);			\
       }									\
     if (charset_alt == CHARSET_ASCII || charset_alt < 0)		\