On 10.12.2015 18:36, Juha Manninen wrote:
On Thu, Dec 10, 2015 at 7:29 PM, Jürgen Hestermann
<[email protected]> wrote:
Then why does the compiler complain when I
feed UTF8Delete with an UTF8String?
As it told you. It got UTF8String but expected AnsiString. I think it
would work with a typecast but that is quite useless. Just use a
String instead.
In fact the Unicode support is now almost Delphi compatible at source
level. Only code that depends on system codepage needs special
attention.

What if I compile my application with DisableUTF8RTL or (in the future) I compile with String=UnicodeString (utf-16) and I still need to use UTF8String with UTF8* functions (e.g. because an external library uses it)?

IMO, there should be overloaded versions for UTF8* functions that explicitely accept UTF8String.
Or am I wrong?

Ondrej

--
_______________________________________________
Lazarus mailing list
[email protected]
http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus

Reply via email to