[fpc-devel] utf8 in 2.6.0

Martin Schreiber mse00000 at gmail.com
Tue Jan 1 18:36:01 CET 2013


On Tuesday 01 January 2013 18:00:59 Jonas Maebe wrote:
>
> I have no idea how anything I wrote suggests that it wouldn't. As
> mentioned, the only difference is that string constants containing
> characters >#127 are no longer always converted to unicodestring constants
> at compile time. They are ansistring constants with the appropriate code
> page by default, and hence are only converted (at compile, since they are
> constants) to a different string type/code page when required.
>
So #n or #nn or #nnn or #nnnn or #nnnnn always means Unicode codepoint and 
will be at compiletime converted to an 8bit character sequence depending on 
{$codepage} and stored in a cpstrnew with the codepage of {$codepage} if  
assigned to a cpstrnew variable?
And if the constant is assigned to a UnicodeString variable the Unicode 
codepoints are converted and stored to a utf-16 16bit character sequence at 
compiletime independent if they contain codepoints > 255?
Has somebody a link to Embarcadero documentation about the matter? I assume 
FPC trunk does exactly the same as Delphi XE3 with strings?

Thanks for your patience, Martin



More information about the fpc-devel mailing list