[fpc-pascal] Warning not to use the "String" type with FPC 3.x

Tomas Hajny XHajT03 at hajny.biz
Mon May 9 18:37:22 CEST 2016


On Mon, May 9, 2016 17:49, Graeme Geldenhuys wrote:
> On 2016-05-09 16:34, Sven Barth wrote:
>> MS-DOS and Win16 where memory restrictions are much more likely to
>> arise.
>
> Fair enough. Then use UTF-8 (instead of UTF-16) as the default (or only)
> encoding for the RTL. UTF-8 memory usage is on-par with AnsiString (FPC
> 2.6.4 and earlier) for MS-DOS and Win16 targets - or at least it should
> be (the first 255 characters of UTF-8 are single byte encoded).
 .
 .

No, not quite - your statement does not apply for anything beyond the
first 127 characters (the meaning of all characters starting with #128
depends on the selected codepage and thus encoded differently in UTF-8 in
many cases).

Tomas





More information about the fpc-pascal mailing list