Subversion Repositories tpanel

Rev

Rev 474 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 474 Rev 482
Line 904... Line 904...
904
 
904
 
905
bool isUTF8(const string& str)
905
bool isUTF8(const string& str)
906
{
906
{
907
    int c,i,ix,n,j;
907
    int c,i,ix,n,j;
908
 
908
 
909
    for (i=0, ix = str.length(); i < ix; i++)
909
    for (i = 0, ix = static_cast<int>(str.length()); i < ix; i++)
910
    {
910
    {
911
        c = (unsigned char) str[i];
911
        c = (unsigned char) str[i];
912
 
912
 
913
        if (0x00 <= c && c <= 0x7f)
913
        if (0x00 <= c && c <= 0x7f)
914
            n=0; // 0bbbbbbb
914
            n=0; // 0bbbbbbb
Line 936... Line 936...
936
size_t utf8Strlen(const std::string& str)
936
size_t utf8Strlen(const std::string& str)
937
{
937
{
938
    int c,i,ix;
938
    int c,i,ix;
939
    size_t q;
939
    size_t q;
940
 
940
 
941
    for (q = 0, i = 0, ix = str.length(); i < ix; i++, q++)
941
    for (q = 0, i = 0, ix = static_cast<int>(str.length()); i < ix; i++, q++)
942
    {
942
    {
943
        c = (unsigned char)str[i];
943
        c = (unsigned char)str[i];
944
 
944
 
945
        if (c >= 0 && c <= 127)
945
        if (c >= 0 && c <= 127)
946
            i += 0;
946
            i += 0;