# HG changeset patch # User Kenichi Handa # Date 1076065520 0 # Node ID 109e674576b8d9d3158018c007a372c095df4a1e # Parent 58e8a09655ce365367bc766ba1a3faf5f55e0927 (CHAR_CHARSET_P): Fix for the case that the method is subset or superset. diff -r 58e8a09655ce -r 109e674576b8 src/charset.h --- a/src/charset.h Thu Feb 05 09:07:39 2004 +0000 +++ b/src/charset.h Fri Feb 06 11:05:20 2004 +0000 @@ -110,8 +110,8 @@ charset_unify_map, /* If characters in the charset must be unified Unicode, the value - is a char table that maps a character code in the charset to - the corresponding Unicode character. */ + is a char table that maps a unified Unicode character code to + the non-unified character code in the charset. */ charset_deunifier, /* The length of the charset attribute vector. */ @@ -484,7 +484,9 @@ /* 1 iff CHARSET may contain the character C. */ #define CHAR_CHARSET_P(c, charset) \ ((ASCII_CHAR_P (c) && (charset)->ascii_compatible_p) \ - || (CHARSET_UNIFIED_P (charset) \ + || ((CHARSET_UNIFIED_P (charset) \ + || (charset)->method == CHARSET_METHOD_SUBSET \ + || (charset)->method == CHARSET_METHOD_SUPERSET) \ ? encode_char ((charset), (c)) != (charset)->invalid_code \ : (CHARSET_FAST_MAP_REF ((c), (charset)->fast_map) \ && ((charset)->method == CHARSET_METHOD_OFFSET \