[Lazarus] UTF8String and UTF8Delete

Ondrej Pokorny lazarus at kluug.net
Thu Dec 10 18:41:37 CET 2015


On 10.12.2015 18:29, Jürgen Hestermann wrote:
>
>
> Am 2015-12-10 um 18:22 schrieb Juha Manninen:
>> On Thu, Dec 10, 2015 at 6:49 PM, Jürgen Hestermann
>> <juergen.hestermann at gmx.de> wrote:
>>> How can I use UTF8Delete on an UTF8string?
>> You can't. Please read this :
>>   http://wiki.freepascal.org/Better_Unicode_Support_in_Lazarus
>> "String" type is UTF-8 and it works now (almost) transparently without
>> explicit conversions.
>>
> Then why does the compiler complain when I
> feed UTF8Delete with an UTF8String?

Why do you insist in using UTF8Delete? Use just Delete:

var
   xUF: UTF8String;
begin
   Delete(xUF, 1, 1);
end;

Ondrej




More information about the Lazarus mailing list