- we need to exactly check for both highest bits to be set, not one of them.
int n = 0;
unsigned char test = (1<<7);
int n = 0;
unsigned char test = (1<<7);
- if ((*CharS & 0xC0) == 0)
+ if ((*CharS & 0xC0) != 0xC0)
return 1;
while ((n < 8) &&
return 1;
while ((n < 8) &&
static inline int Ctdl_IsUtf8SequenceStart(const char Char)
{
/** 11??.???? indicates an UTF8 Sequence. */
static inline int Ctdl_IsUtf8SequenceStart(const char Char)
{
/** 11??.???? indicates an UTF8 Sequence. */
- return ((Char & 0xC0) != 0);
+ return ((Char & 0xC0) == 0xC0);