[fpc-devel] new string - question on usage

Martin Schreiber mse00000 at gmail.com
Wed Oct 12 11:47:55 CEST 2011


On Wednesday 12 October 2011 11.13:45 Sven Barth wrote:
> Am 12.10.2011 10:59, schrieb Martin Schreiber:
> > On Wednesday 12 October 2011 09.50:33 Marco van de Voort wrote:
> >> Undecided. But I'm very strongly against utf16 default on unix. I don't
> >> do much GUI on unix, and it would be insane to have a string type that
> >> is totally different from all other string types that I touch.
> > 
> > Do I understand it right that the constants, variables and properties in
> > classes.pas and db.pas which currently have the type "string" will be
> > utf-8 on Unix and utf-16 on Windows?
> 
> There is no final decision on this topic, so it's hard to say what is
> and what is not (the topic is not easy and we aren't far enough to even
> have a fully working implementation of the dynamic string type).
> 
I'd like to repeat my statement, for me as the author of MSEide+MSEgui the 
current situation is ideal: string = AnsiString  = 8 bit  system encoding, 
UnicodeString  = utf-16.
What I had to do was to implement UnicodeString file- and other system-utils 
and UnicodeString datalists and the like. All this is already available in 
MSEgui.
If the char size of "string" is different on Unix and Linux I am most likely 
forced to fork  db.pas and classes.pas which maybe even is impossible because 
of the necessary compiler magic. Hmm, what about RTTI? This most likely 
prohibits forking. Do we really need here utf-16 in all strings?
A side note: I don't think that following Delphi blindly is always a good 
idea. Have a look at Firemonkey and you know what I mean. ;-)

Martin



More information about the fpc-devel mailing list