[fpc-devel] String handling in trunk (was utf8 in 2.6.0)

Tomas Hajny XHajT03 at hajny.biz
Mon Jan 7 17:05:21 CET 2013


On Mon, January 7, 2013 14:19, Michael Schnell wrote:
> On 01/07/2013 02:01 PM, Tomas Hajny wrote:
>> (also just my understanding of what Jonas wrote)
>
> I feel you are wrong. The string does not know about the code it's
> content is to be interpreted in (other than with Delphi XE).

Sorry, your way of quoting makes it difficult for others to react.

I freely admit that I may be wrong, but I don't understand what you meant
with your comment and thus I don't understand in what way you I am wrong
in your view. The compiler obviously knows how the constant is used within
the source code and thus it may proceed accordingly (i.e. either convert
it to some 8-bit encoding at compile time if UTF-16 code constant appears
in the source, or keep it in UTF-16 if assigned to a UnicodeString
constant).

Tomas





More information about the fpc-devel mailing list