You are not logged in.
Pages: 1
see the code:
var
rawutf8str: RawUtf8 = '333你abc好33a';
...
writeln(PosI('ABC好',rawutf8str)); // result is 7
writeln(PosIU('ABC好',rawutf8str)); // result is 0, should be 7
synunistr := Utf8ToSynUnicode(rawutf8str);
writeln(Pos('abc好', synunistr)); // result is 5
PosIU() seems failed to find the substr.
Offline
This is expected: PosIU() is not the same as PosI().
It is calling GetNextUtf8Upper() which only deals with WinAnsi (code page 1252) characters to deal with the accents appearing in this code page (e.g. é è ê ë e = E).
I just refined the documentation to make it more explicit and avoid such confusion.
https://github.com/synopse/mORMot2/commit/befb5906f
Offline
Pages: 1