diff src/mule-charset.c @ 347:7c94d56991e1 r21-1-3

Import from CVS: tag r21-1-3
author cvs
date Mon, 13 Aug 2007 10:53:48 +0200
parents fbbf69b4e8a7
children 8e84bee8ddd0
line wrap: on
line diff
--- a/src/mule-charset.c	Mon Aug 13 10:53:20 2007 +0200
+++ b/src/mule-charset.c	Mon Aug 13 10:53:48 2007 +0200
@@ -1020,7 +1020,11 @@
   else	/* CHARSET_CHARS (cs) == 96) */	     lowlim = 32, highlim = 127;
 
   CHECK_INT (arg1);
-  a1 = XINT (arg1);
+  /* It is useful (and safe, according to Olivier Galibert) to strip
+     the 8th bit off ARG1 and ARG2 becaue it allows programmers to
+     write (make-char 'latin-iso8859-2 CODE) where code is the actual
+     Latin 2 code of the character.  */
+  a1 = XINT (arg1) & 0x7f;
   if (a1 < lowlim || a1 > highlim)
     args_out_of_range_3 (arg1, make_int (lowlim), make_int (highlim));
 
@@ -1033,7 +1037,7 @@
     }
 
   CHECK_INT (arg2);
-  a2 = XINT (arg2);
+  a2 = XINT (arg2) & 0x7f;
   if (a2 < lowlim || a2 > highlim)
     args_out_of_range_3 (arg2, make_int (lowlim), make_int (highlim));
 
@@ -1347,7 +1351,7 @@
 		  CHARSET_LEFT_TO_RIGHT,
 		  build_string
 		  ("JIS X0208-1978 (Japanese Kanji; Old Version)"),
-		  build_string ("\\(jisx0208\\|jisc6226\\).19"));
+		  build_string ("\\(jisx0208\\|jisc6226\\).1978"));
   Vcharset_japanese_jisx0208 =
     make_charset (146, Qjapanese_jisx0208,
 		  LEADING_BYTE_JAPANESE_JISX0208, 3,