aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/charset.c5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/charset.c b/src/charset.c
index 818457f8e1b..118d5fed9ba 100644
--- a/src/charset.c
+++ b/src/charset.c
@@ -143,7 +143,10 @@ invalid_character (c)
143 (charset) = (str)[1], (c1) = (str)[2] & 0x7F, (c2) = (str)[3] & 0x7F; \ 143 (charset) = (str)[1], (c1) = (str)[2] & 0x7F, (c2) = (str)[3] & 0x7F; \
144 } while (0) 144 } while (0)
145 145
146/* 1 if CHARSET, C1, and C2 compose a valid character, else 0. */ 146/* 1 if CHARSET, C1, and C2 compose a valid character, else 0.
147 Note that this intentionally allows invalid components, such
148 as 0xA0 0xA0, because there exist many files that contain
149 such invalid byte sequences, especially in EUC-GB. */
147#define CHAR_COMPONENTS_VALID_P(charset, c1, c2) \ 150#define CHAR_COMPONENTS_VALID_P(charset, c1, c2) \
148 ((charset) == CHARSET_ASCII \ 151 ((charset) == CHARSET_ASCII \
149 ? ((c1) >= 0 && (c1) <= 0x7F) \ 152 ? ((c1) >= 0 && (c1) <= 0x7F) \