X-Git-Url: http://git.chise.org/gitweb/?p=chise%2Fxemacs-chise.git.1;a=blobdiff_plain;f=src%2Fmule-charset.c;h=67f10498a2db71a20740c2517c2ed4067b6fd9b3;hp=8effd751a45cebf03a5b1546f54d6d158edb0501;hb=113b194be934327de99a168d809271db252c07c4;hpb=e22b5c8bdcbf854845110210456025888e130fea;ds=sidebyside diff --git a/src/mule-charset.c b/src/mule-charset.c index 8effd75..67f1049 100644 --- a/src/mule-charset.c +++ b/src/mule-charset.c @@ -1067,7 +1067,11 @@ Make a multi-byte character from CHARSET and octets ARG1 and ARG2. 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)); @@ -1080,7 +1084,7 @@ Make a multi-byte character from CHARSET and octets ARG1 and ARG2. } 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)); @@ -1421,7 +1425,7 @@ complex_vars_of_mule_charset (void) build_string ("JISX0208.1978 (Japanese)"), build_string ("JISX0208.1978 Japanese Kanji (so called \"old JIS\")"), - build_string ("\\(jisx0208\\|jisc6226\\).19")); + build_string ("\\(jisx0208\\|jisc6226\\)\\.1978")); Vcharset_chinese_gb2312 = make_charset (LEADING_BYTE_CHINESE_GB2312, Qchinese_gb2312, 3, CHARSET_TYPE_94X94, 2, 0, 'A',