Fix for bug #600479: error decoding UTF-8 triplet

This commit is contained in:
Karl Waclawek 2002-08-27 00:28:48 +00:00
parent 19dce96507
commit 969d3363fe

View File

@ -84,7 +84,11 @@
#define UTF8_INVALID3(p) \ #define UTF8_INVALID3(p) \
(((p)[2] & 0x80) == 0 \ (((p)[2] & 0x80) == 0 \
|| \ || \
((*p) == 0xEF ? (p)[2] > 0xBD : ((p)[2] & 0xC0) == 0xC0) \ ((*p) == 0xEF && (p)[1] == 0xBF \
? \
(p)[2] > 0xBD \
: \
((p)[2] & 0xC0) == 0xC0) \
|| \ || \
((*p) == 0xE0 \ ((*p) == 0xE0 \
? \ ? \