[fpc-devel] UTF8 RTL

Marco van de Voort marcov at stack.nl
Sun Nov 23 17:28:14 CET 2014


In our previous episode, Michael Van Canneyt said:
> > It is not, and neither is it "aware". It is only so when you set
> > defaultsystemcodepage to utf8 and ignore the problems that causes.  That is
> > not intended functionality.

To make things clear:
I meant in the way Mattias proposed, continueing making the default
"string" type utf8 on Windows. Utf8string is fine, but limited.

That basically perpetuates the current hack, just slightly more elegant. 

That being said, FPC is not offering a complete solution yet, and 2.8.x will be a
transition version. (or one in a series of transitional versions)

> It is UTF-8 aware in the sense that now you can safely define a 1-byte 
> string containing UTF-8 and expect the compiler to do the necessary 
> conversions more or less automatically when needed, such as when 
> passing it to a routine that expects widestrings.

> That was simply impossible prior to the work of Jonas and others.

It is certainly progress, and hopefully a start on at least removing the OS
specific aspects of Lazarus *utf8 routines.

I would at least try to get as far as possible without changing
defaultsystemcodepage (etc) though.



More information about the fpc-devel mailing list