[fpc-devel] Unicode support (yet again)

Michael Schnell mschnell at lumino.de
Fri Sep 16 10:48:13 CEST 2011


On 09/15/2011 09:07 PM, Felipe Monteiro de Carvalho wrote:
> Well, I think the RTL should introduce a TStringsUTF8 at the very
> least.
and/or (better ?!? ) introduce a basic string type name TStringUTF8.

I understand that cpstrnew is at least considered on the long run.

Is migrating to multiple string types (each denoting a certain encoding) 
and migrating to cpstrnew (a single string type with dynamical encoding) 
a contradiction or can it be consolidated ?

What is supposed to happen to the nasty legacy types called "String" and 
"Char" in that case ?

IMHO at best it would just be killed. A programmer can easily do "Type 
String = TStringUTF8; Char = TCharUTF8  (or choose using some different 
string type) in some central unit's interface part.

This approach would allow for continuing the "naive" use of 
"MyChar:=MyString[1];" (as would migrating to cpstrnew, but with less 
possible performance degradation).

-Michael



More information about the fpc-devel mailing list