# HG changeset patch # User Kenichi Handa # Date 1028099196 0 # Node ID 894b8bce32081bf823f4b4bd9cfba61332b45859 # Parent 233c080b5756a13e701256a37e2db0e2e247955d (Funibyte_char_to_multibyte): If C can't be decoded by the primary charset, make it eight-bit char. (Fmultibyte_char_to_unibyte): Call CHAR_TO_BYTE8. diff -r 233c080b5756 -r 894b8bce3208 src/character.c --- a/src/character.c Wed Jul 31 07:05:33 2002 +0000 +++ b/src/character.c Wed Jul 31 07:06:36 2002 +0000 @@ -247,7 +247,7 @@ charset = CHARSET_FROM_ID (charset_primary); c = DECODE_CHAR (charset, c); if (c < 0) - error ("Can't convert to multibyte character: %d", XINT (ch)); + c = BYTE8_TO_CHAR (XFASTINT (ch)); return make_number (c); } @@ -260,17 +260,12 @@ Lisp_Object ch; { int c; - unsigned code; struct charset *charset; CHECK_CHARACTER (ch); c = XFASTINT (ch); - charset = CHARSET_FROM_ID (charset_primary); - code = ENCODE_CHAR (charset, c); - if (code < CHARSET_MIN_CODE (charset) - || code > CHARSET_MAX_CODE (charset)) - error ("Can't convert to unibyte character: %d", XINT (ch)); - return make_number (code); + c = CHAR_TO_BYTE8 (c); + return make_number (c); } DEFUN ("char-bytes", Fchar_bytes, Schar_bytes, 1, 1, 0,