[fpc-devel] UTF8 RTL
Michael Van Canneyt
michael at freepascal.org
Sun Nov 23 17:22:21 CET 2014
On Sun, 23 Nov 2014, Marco van de Voort wrote:
> In our previous episode, Mattias Gaertner said:
>>> doesn't support all characters that can be encoded using UTF-8, ...) or
>>> on all platforms (some platforms don't even support multiple code pages).
>>
>> Hmm, maybe you have a point there.
>> It is similar to normal RTL and RTL with CurrencyString:='Euro'.
>> When I say "Euro RTL" it does not work correctly in all
>> scenarios, but I'm sure some people think it does.
>>
>> I doubt that I can come up with a name, that everyone understands
>> correct, but I have to call it something.
>>
>> What about "RTL with UTF8 as default"?
>
> 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.
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.
Michael.
More information about the fpc-devel
mailing list