[Lazarus] UTF8String and UTF8Delete

Ondrej Pokorny lazarus at kluug.net
Fri Dec 11 13:05:13 CET 2015


On 11.12.2015 09:10, "Jürgen Hestermann" wrote:
> 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).
> Just please help me understanding this:
> The unit LazUTF8 unit is for manipulating UTF8 strings only, correct?
> Is there any reason that all functions are declared with
> parameter type STRING instead of UTF8String?
> For what else should I use UTF8delete if not for UTF8strings?
> And what happens if the string has a different encoding than UTF8?
> I doubt that the function will produce any useful result in this case
> because it expects UTF8.

IMO it's a valid issue. Please create a feature request in the bug 
tracker and - best - create a patch that introduces function overloads 
that accept UTF8Strings.

Ondrej
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lazarus-ide.org/pipermail/lazarus/attachments/20151211/c6900f39/attachment-0003.html>


More information about the Lazarus mailing list