X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/99749f85a14d6d920eadbdfcd9a925e22f79cb7f..6362d82b3ed82aa6795e4ad03160820f94c9e4d4:/src/common/stringops.cpp diff --git a/src/common/stringops.cpp b/src/common/stringops.cpp index b4959f846c..9ccd34d95c 100644 --- a/src/common/stringops.cpp +++ b/src/common/stringops.cpp @@ -131,7 +131,16 @@ bool wxStringOperationsUtf8::IsValidUtf8String(const char *str, size_t len) if ( !(b >= 0x80 && b <= 0xBF ) ) return false; } - else if ( b <= 0xEF ) // E1..EF + else if ( b == 0xED ) + { + b = *(++c); + if ( !(b >= 0x80 && b <= 0x9F ) ) + return false; + b = *(++c); + if ( !(b >= 0x80 && b <= 0xBF ) ) + return false; + } + else if ( b <= 0xEF ) // E1..EC EE..EF { for ( int i = 0; i < 2; ++i ) {