[Lazarus] UTF8String and UTF8Delete

Sven Barth pascaldragon at googlemail.com
Fri Dec 11 08:03:17 CET 2015


Am 11.12.2015 06:52 schrieb "Jürgen Hestermann" <juergen.hestermann at gmx.de>:
>
>
>
> 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?

UTF8Delete probably takes an AnsiString (or String) as var parameter and
for var parameters the static codepages have to match exactly (String has
CP_ACP while Utf8String has CP_UTF8).

Regards,
Sven
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151211/57fc8055/attachment-0003.html>


More information about the Lazarus mailing list