[fpc-devel] bug report 20473: Please add a directive to define string=utf8string

Sven Barth pascaldragon at googlemail.com
Thu Oct 13 11:51:07 CEST 2011


Am 13.10.2011 11:28, schrieb Felipe Monteiro de Carvalho:
> On Thu, Oct 13, 2011 at 11:24 AM, Sven Barth
> <pascaldragon at googlemail.com>  wrote:
>> I think he ment that if such a feature is introduced it would be a natural
>> conclusion to define "string = unicodestring" on Windows and "string =
>> utf8string" for Unix in the RTL and the FCL
>
> ? I am totally lost as to what this has to do with my proposal. My
> proposal is to add a minimum facility to port UTF-8 based code which
> makes heavy use of the "string" keyword. It says nothing about which
> string the RTL should use.
>

In one of your mails you had the example of the units "system" and 
"classes" which define "string" as aliased to the string type "banana". 
So if such a feature is added (and as Michael wrote, if it's added it's 
added the powerful way) then it seems likely that it will be used in the 
RTL and the FCL as well to (hopefully) simplyfy the problem of having 
UTF-16 on Windows and UTF-8 on Windows and OEM/Ansi on OS/2 and DOS. 
Thus those two libraries (RTL and FCL) need to be able to cope with a 
different string type.

So it has nothing to do directly with the proposal of that feature or 
Lazarus, but with the consequences or further usecases of this feature.

Regards,
Sven



More information about the fpc-devel mailing list