[Lazarus] Removed use of UTF8String in Lazarus to work with cpstrnew
Paul Ishenin
webpirat at mail.ru
Mon Sep 19 13:19:47 CEST 2011
19.09.2011 20:05, Hans-Peter Diettrich wrote:
>> Compiler adds implicit codepage conversion for string arguments. I
>> had to avoid that. The better choise would be to use RawByteString
>> type but I it is not defined in fpc 2.4.4 which we need to support.
>
>
> IMO the use of RawByteString will not help much, except for (possibly)
> simpler code and less overloaded procedures. Avoiding implicit
> conversions instead will require *fixed* string types and encodings,
> for different tasks with different needs. E.g. a TFileName string type
> will allow to eliminate all conversions, when a string is known to
> hold file or path names (by design). Likewise an LCLString (widget,
> component) type could do the same for the LCL widgetset interface. The
> FPC decisions about string container classes (TStrings...) will tell
> where to put the break line, between user and widget string types.
My statement about RawByteString need to be read in the context of code
where I replaced UTF8String to AnsiString.
Best regards,
Paul Ishenin.
More information about the Lazarus
mailing list