[fpc-pascal] Strings - suggestions

Michael Van Canneyt michael at freepascal.org
Sat Dec 22 15:45:13 CET 2012



On Sat, 22 Dec 2012, Martin Schreiber wrote:

> On Saturday 22 December 2012 12:55:12 Michael Van Canneyt wrote:
> [...]
>> - The {$H } directive will be extended so you can choose which string type
>> you need per unit. (ansi/wide/utf16/utf8...)
>>    This is different from Delphi, where you don't have this choice:
>> String=Widestring.
>
> You probably mean String = UnicodeString = reference counted utf-16 encoded 16
> bit string?

Yes.

>>
>> Because of the requirement for backwards compatibility with FPC itself,
>> we'll make 2 RTLs: one backwards compatible, one with the new unicode
>> string.
>>
> UnicodeString or codepage aware cpstrnew?

'codepage aware' just means that you can specify a charsize/codepage. 
A unicode string is just one type of codepage aware string.
(unless the compiler guys now tell me otherwise).

So, string will mean Unicode string.

The effect is that
   TComponent.Name
etc. will be a unicode string.

In the backwards compatible RTL,
   TComponent.Name
will be an ansistring, i.e. as it is now.

Michael.


More information about the fpc-pascal mailing list