[Lazarus] Beyond Compare 4 built with Lazarus 1.2
Michael Van Canneyt
michael at freepascal.org
Mon Dec 30 22:43:23 CET 2013
On Mon, 30 Dec 2013, Graeme Geldenhuys wrote:
> On 2013-12-30 11:59, Michael Van Canneyt wrote:
>> These cases need to be checked anyway if we
>> would move to a 2-byte char.
>
> Does that now mean the FPC's Unicode RTL actually means UTF-16?
It means string = unicodestring, so yes.
BUT
All file open routines already exist as UTF-16 or single byte variants today in trunk.
That will not change.
So where Delphi changed the system unit so it has only the equivalent of
Procedure Assign(Var F : Text; AFileName : UnicodeString);
FPC will have (in fact, it already has in trunk) overloaded versions:
Procedure Assign(Var F : Text; AFileName : UnicodeString);
Procedure Assign(Var F : Text; AFileName : AnsiString);
Procedure Assign(Var F : Text; AFileName : RawByteString);
So depending on the string type you use, the 'correct' one will be chosen.
>
> ps:
> 1) So what will the size of Char be in bytes?
in the unicode RTL: 2
>
> 2) What will the size in bytes be of ThousandSeparator and
> DecimalSeparator be? eg: fpGUI had to introduce its own versions of
> these, with a 4-byte max size (as per UTF-8 spec) because some locales
> require a 3-byte UTF-8 value.
In the unicode RTL they will be UTF-16 characters, so 2 bytes.
Michael.
More information about the Lazarus
mailing list