[fpc-devel] Controlling the output of the widestring manager

Marc Weustink marc at dommelstein.net
Sun Dec 2 19:53:42 CET 2007

Florian Klaempfl wrote:
> Marc Weustink schrieb:
>> Florian Klaempfl wrote:
>>> Felipe Monteiro de Carvalho schrieb:
>>>> On Dec 2, 2007 1:04 AM, Marc Weustink <marc at dommelstein.net> wrote:
>>>>>  From the logs I understand that there is a "real" managed utf8string
>>>>> type (other than utf8string = type string).
>>>> No, currently utf8string = type string is about all support
>>>> implemented for such type.
>>> Indeed, patches for a utf8string unit are welcome ;)
>> Waht kind of patches are needed ? 
> No idea :) Lazarus complained that things are missing.
>> I just happen to notice that someone
>> is adding unicodestring support ;)
>> would this be a replacemnt for the utf8strng ?.
> No. It will be an utf-16 string. On non windows unicodestring=widestring

Aahh... the wide string as the widestring should have been on windows.
I got confused, since UTF8 is unicode too :)

Anyway, what I think for Lazarus is need is:
A) a transparent way of assigning from/to other stringtypes, 
(shortstring/widestring/ansistring), where under the hood the contents 
is converted.
B) a transparent way of passing as param of other stringtypes, 
(shortstring/widestring/ansistring), where under the hood the contents 
is converted.
C) a way of specifying the default type of the string type, to allow 
easier converiosn of existing codebases

ad A: From what I have seen with type UTF8String = type ansistring it is 
not possible to do with operator overloading since both types utf8string 
and ansistring are considered the same

ad B: there is no operator for this, so it acnt be overloaded

So imo, a real type is needed for this, but as I understood that would 
blowup the stringmanager.


More information about the fpc-devel mailing list