On Fri, 11 Dec 2015 15:02:45 +0200 Juha Manninen <juha.mannine...@gmail.com> wrote:
>[...] > FYI Ondrej, having overloaded versions only for procedures taking var > parameters makes no sense even when using DisableUTF8RTL. Lossy > conversion would happen in every function using "String" type. Instead > all functions must be copied and UTF8String must be used everywhere. > The current functions make sense only with our new UTF-8 system which > changes AnsiString encoding to UTF-8. Without DisableUTF8RTL you can pass an UTF8String to a non "var" String parameter. The compiler will add some checks, but they don't change the encoding. Same for return values String to UTF8String. With DisableUTF8RTL passing UTF8String to String changes encoding. So every function needs an overloaded wrapper function. No need to copy the implementation. Mattias -- _______________________________________________ Lazarus mailing list Lazarus@lists.lazarus.freepascal.org http://lists.lazarus.freepascal.org/mailman/listinfo/lazarus