[fpc-devel] Unicode support (yet again)

Graeme Geldenhuys graemeg.lists at gmail.com
Thu Sep 15 23:06:59 CEST 2011


On 15 September 2011 19:09, Hans-Peter Diettrich  wrote:
>
> What data type would you use, to store an UTF-8 character?
> And how to access the n-th character in an UTF-8 string?

I already showed how in a previous post. For more details on how fpGUI
does this, have a look at the fpg_base.pas and fpg_stringutils.pas
units in the fpGUI repository.

  TfpgChar        = type string[4];

The maximum size any UTF-8 code point can be.  Basically a character
is treated just like a string - only a small string.


> RTL is a mere *display* feature, the chars still are stored from first to

My problem is not the implementation, but the fact that I can't read
or understand any right-to-left languages. :)



-- 
Regards,
  - Graeme -


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



More information about the fpc-devel mailing list