version 1.25, 2009/12/15 11:39:33
|
version 1.26, 2010/06/06 17:04:16
|
|
|
| |
Boolean isUTF8Aux(const char *legal) | Boolean isUTF8Aux(const char *legal) |
{ | { |
char numBytes = UTF_8_COUNT_TRAIL_BYTES(*legal)+1; |
unsigned char numBytes = UTF_8_COUNT_TRAIL_BYTES(*legal)+1; |
| |
// Validate that the string is long enough to hold all the expected bytes. | // Validate that the string is long enough to hold all the expected bytes. |
// Note that if legal[0] == 0, numBytes will be 1. | // Note that if legal[0] == 0, numBytes will be 1. |
for (char i=1; i<numBytes; i++) |
for (unsigned char i=1; i<numBytes; i++) |
{ | { |
if (legal[i] == 0) | if (legal[i] == 0) |
{ | { |