[DEV] correction of the get Utf8 size back
This commit is contained in:
parent
78d0986454
commit
44640896f5
@ -288,8 +288,13 @@ int8_t etk::UniChar::TheoricUTF8Len(const char _input)
|
|||||||
|
|
||||||
bool etk::UniChar::TheoricUTF8First(const char _input)
|
bool etk::UniChar::TheoricUTF8First(const char _input)
|
||||||
{
|
{
|
||||||
if((_input&0x80) == 0x80 ) {
|
// When started with the bit 0 then the size is signle element.
|
||||||
return false;
|
if((_input&0x80) == 0x00 ) {
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
return true;
|
// for multiple element size, we just need to check the second element (might be != 1)
|
||||||
|
if((_input&0x40) == 0x40 ) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user