[Lazarus] Replacing Delphi function calls with FCL/LCL functions by converter

Jürgen Hestermann juergen.hestermann at gmx.de
Thu Jul 8 18:30:22 CEST 2010


> Hans-Peter Diettrich schrieb:
> I just wonder why special UTF8 functions are required at all. From the 
> user VP the use of UTF-8 arguments should not deserve different 
> procedures, overloaded procedures should be sufficient if ever required. 

I don't think so. It just opens a can of worms. The user will believe that there is no need to pay attention to encoding, the compiler will do it all for him. But that's not true. Even if it works in some circumstances, it's not a solution for all cases. The user should be kept aware that he is working with different encodings. It can also happen, that different encoding types are handled by a program. If the user can not rely on getting back a certain encoding it will be a severe problem. It may be not so convenient to use different function/procedure names but it keeps everything clear at least. And it also makes clear where conversions (with possible loss of characters) are needed/appear.






More information about the Lazarus mailing list