[fpc-pascal] FPC vs Delphi's unicode string support questions
Graeme Geldenhuys
graemeg.lists at gmail.com
Sat Aug 18 16:59:03 CEST 2012
Hi,
On 18 August 2012 15:05, Marco van de Voort <marcov at stack.nl> wrote:
>
> If it relies heavily on unicodestring, IMHO yes.
Well, there is a clear distinction being made between AnsiString and
String in many classes.
For example:
TtiCompressAbs = class(TObject)
public
....
function CompressString( const AFrom : string; var ATo :
string): Extended; overload; virtual; abstract;
function CompressString( const AFrom : AnsiString; var ATo :
AnsiString) : Extended; overload; virtual; abstract;
...
end;
This gives a compiler error in 2.7.1
> My guess is that you mistook a comment that confirmed the base
> implementation of the variable stringtype to be compatible for a
> confirmation that the whole project is ready.
The conversation was about many D2009+ features, but I think the main
feature tiOPF v3 uses is the Unicode string.
>> 2) If true, what is String an alias of? UnicodeString, WideString,
>> something else?
>
> ansistring or shortstring, depending on {$H+}. What to do with the D2009+
> change in this regard has been discussed, but opinions varied.
OK, all projects I work on always have {$H+} defined, so for me (in
2.6.1 and earlier), String always means AnsiString.
I guess from the rest of your reply, I am jumping the gun here...
Clearly 2.7.1 is not nearly ready yet for such a Delphi port.
Thanks for all the info.
--
Regards,
- Graeme -
_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net
More information about the fpc-pascal
mailing list