[Lazarus] substr return wrong string with some utf8 char
Hans-Peter Diettrich
DrDiettrich1 at aol.com
Fri Feb 11 18:55:43 CET 2011
José Mejuto schrieb:
>>> Is it logical/safe that utf8 functions do not check utf8 integrity ?
>>> I'm talking about utf8pos, utf8copy, etc...
> HPD> There exists no need for an utf8pos function, for use with an utf8copy,
>
> Nothing is needed for utf8copy ;) utf8pos is needed to return the
> "characters" position of an string it use for utf8copy or to display
> the information somewhere is a different matter.
Why determine an UTF-8 character index, when this one has to be
converted later into an byte (char) index inside utf8copy?
DoDi
More information about the Lazarus
mailing list