[fpc-devel] Unicode support (yet again)

Felipe Monteiro de Carvalho felipemonteiro.carvalho at gmail.com
Thu Sep 15 11:06:00 CEST 2011


On Thu, Sep 15, 2011 at 10:59 AM, Martin Schreiber <mse00000 at gmail.com> wrote:
> There are plenty of user problems with utf-8 character access and string
> length. I assume 100% of them would be solved with utf-16.

It would solve for those writing buggy software which ignores part of
the Unicode characters.

On the other hand 100% of them would be solved correctly, for all
Unicode characters by using LCLProc.UTF8CharacterLength

http://lazarus-ccr.sourceforge.net/docs/lcl/lclproc/utf8characterlength.html

With this routine you can safely iterate through all characters of a
utf-8 string.

-- 
Felipe Monteiro de Carvalho



More information about the fpc-devel mailing list