version 1.1, 2003/08/12 17:56:55
|
version 1.2, 2003/08/20 19:21:07
|
|
|
//%///////////////////////////////////////////////////////////////////////////// | //%///////////////////////////////////////////////////////////////////////////// |
| |
#include "CommonUTF.h" | #include "CommonUTF.h" |
|
#include <cstring> |
PEGASUS_NAMESPACE_BEGIN | PEGASUS_NAMESPACE_BEGIN |
int isValid_U8(const Uint8 *src, int size) | int isValid_U8(const Uint8 *src, int size) |
{ | { |
|
if((strlen((const char*)src)+1) < size) |
|
{ |
|
return false; |
|
} |
Uint8 U8_char; | Uint8 U8_char; |
const Uint8 *srcptr = src+size; | const Uint8 *srcptr = src+size; |
switch (size) | switch (size) |
|
|
return false; | return false; |
} | } |
break; | break; |
|
default: |
|
{ |
|
return false; |
|
} |
| |
} | } |
return true; | return true; |