[fpc-devel] UTF8 RTL

Michael Van Canneyt michael at freepascal.org
Sun Nov 23 17:32:53 CET 2014



On Sun, 23 Nov 2014, Marco van de Voort wrote:

> 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.

I don't know about that.

It is a perfectly valid solution to choose UTF-8 as the unicode encoding of choice.
Now at least the compiler makes this a more viable decision. 
So from this point on, I would no longer speak of a "hack".

> 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)

Correct.

>> 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.

Fully agreed.

Michael.



More information about the fpc-devel mailing list