projects
/
wxWidgets.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
rename wxHeaderCtrl DRAG events into RESIZE ones as we're also going to have column...
[wxWidgets.git]
/
src
/
common
/
stringops.cpp
diff --git
a/src/common/stringops.cpp
b/src/common/stringops.cpp
index ae182c6cfa09f4079c3c8092baf20d80afdd0cc2..9ccd34d95cba6554e405d8e9094be392bf6c1bf1 100644
(file)
--- 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;
}
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 )
{
{
for ( int i = 0; i < 2; ++i )
{
@@
-194,7
+203,7
@@
bool wxStringOperationsUtf8::IsValidUtf8LeadByte(unsigned char c)
// code in single place
wxUniChar::Utf8CharBuffer wxUniChar::AsUTF8() const
{
// code in single place
wxUniChar::Utf8CharBuffer wxUniChar::AsUTF8() const
{
- Utf8CharBuffer buf
;
+ Utf8CharBuffer buf
= { "" }; // init to avoid g++ 4.1 warning with -O2
char *out = buf.data;
value_type code = GetValue();
char *out = buf.data;
value_type code = GetValue();