I pulled the latest version of xmlCheckUTF8 from CVS this morning and
put it in my project, because I can't witch to a newer libxml2 library
right now and now every string, that goes into xmlCheckUTF8() returns
0. Just call it with "test" and it will return 0.
The version from 2.6.7, that I was using, was giving me 1 as result for
"test" and when I gave it "testö", which is obviously not UTF-8, it
gave me 0, which was right.
I took a look at it and saw, that the first condition changed. It now
says it is on valid single byte if (c & 0x80). And as the comments
above indicate a valid single byte starts with "0" and not with "10"
like it is assumed now. If I negate the first condition it works fine

[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]