[Lazarus] Does Lazarus support a complete Unicode Component Library?
Graeme Geldenhuys
graemeg.lists at gmail.com
Thu Feb 17 10:35:15 CET 2011
Op 2011-02-17 11:28, Michael Schnell het geskryf:
> On 02/17/2011 07:19 AM, Jürgen Hestermann wrote:
>>
>> I often search for substrings, delete them from the string, insert
>> other strings at certain places, etc.
>> How can you do all this without knowledge of the internal structure of
>> the string?
> This (magically :-) ) does work with UTF8.
NO, it doesn't! You can't use FPC's Copy(), Pos() etc reliably with
UTF-8 text, because thouse RTL functions work purely on ANSI text
(1-byte characters - speaking of String type text here) and don't know
about multi-byte characters, combining diacritics etc. Hence LCL and
fpGUI have special functions similar to RTL, that knows how to work with
UTF-8 encoded text. eg: UTF8Pos(), UTF8Length and UTF8Copy() etc functions.
Regards,
- Graeme -
--
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/
More information about the Lazarus
mailing list