[fpc-pascal] FPC vs Delphi's unicode string support questions

Graeme Geldenhuys graemeg.lists at gmail.com
Sat Aug 18 21:20:02 CEST 2012


Hi,

On 18 August 2012 16:11, Jonas Maebe <jonas.maebe at elis.ugent.be> wrote:
>
>> 1) Is it correct that String <> AnsiString any more?
>
> Only in {$mode delphiunicode} (which is what you should use if you want to
> compile code written for a Delphi version in which string=unicodestring).

OK, that would help. I'll try that now in tiOPF v3.  When specifying
that mode, do I still need to specify {$H+}?  What happens when I
don't specify {$H+}?


>> 4) What Unicode encoding is used? UTF-8 or UTF-16?
>
> The same as in Delphi: utf-16

Wasn't there lots of "votes" from many that string is UTF-8 encode
under Linux, Unix, MacOSX, and UTF-16 under Windows? Thus avoiding any
conversion speed penalties on all non-Windows platforms.  Or is
defaulting to UTF-16 just the first step of implementing Unicode
support, and UTF-8 will follow for all non-Windows platforms later?


-- 
Regards,
  - Graeme -


_______________________________________________
fpGUI - a cross-platform Free Pascal GUI toolkit
http://fpgui.sourceforge.net



More information about the fpc-pascal mailing list