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

Michael Van Canneyt michael at freepascal.org
Sat Jan 5 13:10:54 CET 2013



On Sat, 5 Jan 2013, Jonas Maebe wrote:

>
> On 05 Jan 2013, at 12:53, Paul Ishenin wrote:
>
>> ResourceStrings are stored as AnsiString type with 0 codepage (as I remember). Delphi now stores ResourceStrings as UnicodeString type. I think FPC will follow this in m_default_unicodestring modeswitch.
>
> It would probably even be better to always do that. At least I don't see a
> downside, other than slightly larger binaries (and that's not an issue in
> this case as far as I'm concerned; maintaining two separate resourcestring
> systems/handlers is just not worth the trouble).

But it means that for

Resourcestring
   AString = 'Something';

Var
   S : Ansistring;

begin
   S:=AString;
end.

Always a conversion will happen.

I do not think this is a good idea given that currently, String = Ansistring.

Michael.



More information about the fpc-devel mailing list