[fpc-devel] new string - question on usage

Michael Schnell mschnell at lumino.de
Thu Oct 13 09:49:40 CEST 2011


On 10/13/2011 02:16 AM, Hans-Peter Diettrich wrote:
>
> Almost every required conversion can be determined at compile time.
It also _can_ be determined at runtime according to the current encoding 
ID of the string(s)

This discussion is not about "can" but about "is" and maybe "should be".

Moreover seemingly there is (or will be, or in Delphi XE is) a type 
called UnicodeString. In the Delphi docs UnicodeString is said to be 
supposed to hold UTF-16 encoded data. But this of course is due to the 
string Windows-Binding of Delphi. On Linux obviously UTF-8 is more 
appropriate. FPC might overcome the problem by not determine conversion 
at runtime with UnicodeString, allowing for UTF-8, UTF-16 (and maybe any 
other) encoding ID with this type without making the variable an 
intersexual string.

-Michael



More information about the fpc-devel mailing list