[Lazarus] substr return wrong string with some utf8 char

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Feb 10 16:00:36 CET 2011


Op 2011-02-10 16:20, Hans-Peter Diettrich het geskryf:
> 
>> is a utf8Subst() like function exist?
> 
> I'd use Pos to get the byte index of the part to copy or remove.

Make that UTF8Pos() (in combination with UTF8Copy) because a UTF-8
character can be anything from 1–4 bytes long.



Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list