[fpc-devel] new string - question on usage

Martin lazarus at mfriebe.de
Tue Oct 11 00:23:05 CEST 2011


On 10/10/2011 23:19, Paul Ishenin wrote:
> 11.10.2011 6:10, Martin wrote:
>> I wasn't askin for changing the default.
>>
>> just for how to do
>>
>> procedure foo(x: utf8string); begin end;
>>
>> var a: string; //ansistring, but contains already utf8
>>
>> foo(a); // do not convert
> use
> foo(x: rawbytestring)

Not good

Utf8ToLower is, (and should) be declared expecting a Utf8String.

If indeed it was called with an ansistring, it should be converted

>>
>> Yes, I know, what i want to do, is not what it was designed for. 
>> ultimately a huge update to the entire source will be needed... but 
>> now I need a temporary solution until then
> Don't use utf8string type until all Lazarus code use it.

I'd like to.

at curren LazUtils does....



More information about the fpc-devel mailing list