claude Pomalo schrieb:

i use the substr function to get some truncated string.
these string are in french language and sometimes contains "à" or "é" etc.. char
When these charaters are in the string the wrong substr is return
substr (pierre à feu,11) return 'pierre à  f' not 'pierre à fr'

length('à') return 2
utf8length('à') return 1

It looks to me as if Length returns the byte count, while Utf8Length returns the character count.

is a utf8Subst() like function exist?

I'd use Pos to get the byte index of the part to copy or remove.

DoDi


--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to