# HG changeset patch # User Kenichi Handa # Date 1029378488 0 # Node ID 2d504d707ce628b40691c8134fb1b921b0ed9e4c # Parent d50b0a9ea97a41478ecf3518948a4cbe0fc52ef6 (unibyte_char_to_multibyte): Refer to charset_unibyte, not charset_primary. (multibyte_char_to_unibyte): Likewise. (Funibyte_char_to_multibyte): Likewise. diff -r d50b0a9ea97a -r 2d504d707ce6 src/character.c --- a/src/character.c Thu Aug 15 02:27:50 2002 +0000 +++ b/src/character.c Thu Aug 15 02:28:08 2002 +0000 @@ -181,14 +181,14 @@ } /* Convert the unibyte character C to the corresponding multibyte - character based on the current value of charset_primary. If C + character based on the current value of charset_unibyte. If C can't be converted, return C. */ int unibyte_char_to_multibyte (c) int c; { - struct charset *charset = CHARSET_FROM_ID (charset_primary); + struct charset *charset = CHARSET_FROM_ID (charset_unibyte); int c1 = DECODE_CHAR (charset, c); return ((c1 >= 0) ? c1 : c); @@ -196,8 +196,8 @@ /* Convert the multibyte character C to unibyte 8-bit character based - on the current value of charset_primary. If dimension of - charset_primary is more than one, return (C & 0xFF). + on the current value of charset_unibyte. If dimension of + charset_unibyte is more than one, return (C & 0xFF). The argument REV_TBL is now ignored. It will be removed in the future. */ @@ -207,7 +207,7 @@ int c; Lisp_Object rev_tbl; { - struct charset *charset = CHARSET_FROM_ID (charset_primary); + struct charset *charset = CHARSET_FROM_ID (charset_unibyte); unsigned c1 = ENCODE_CHAR (charset, c); return ((c1 != CHARSET_INVALID_CODE (charset)) ? c1 : c & 0xFF); @@ -244,7 +244,7 @@ c = XFASTINT (ch); if (c >= 0400) error ("Invalid unibyte character: %d", c); - charset = CHARSET_FROM_ID (charset_primary); + charset = CHARSET_FROM_ID (charset_unibyte); c = DECODE_CHAR (charset, c); if (c < 0) c = BYTE8_TO_CHAR (XFASTINT (ch)); @@ -260,7 +260,6 @@ Lisp_Object ch; { int c; - struct charset *charset; CHECK_CHARACTER (ch); c = XFASTINT (ch);