[Lazarus] substr return wrong string with some utf8 char

José Mejuto joshyfun at gmail.com
Fri Feb 11 16:43:08 CET 2011


Hello Lazarus-List,

Friday, February 11, 2011, 3:06:50 PM, you wrote:

>> 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.

HPD> when Pos already returns the correct start index for Copy. Only the

If not integrity checks are performed, yes, it returns a valid index
position.

-- 
Best regards,
 José





More information about the Lazarus mailing list