[Lazarus] Does Lazarus support a complete Unicode Component Library?

Graeme Geldenhuys graemeg.lists at gmail.com
Wed Feb 16 10:20:47 CET 2011


Op 2011-02-16 10:21, Sergei Gorelkin het geskryf:
>
> When a string being passed to a
> function is empty, it is actually a nil pointer, and its encoding cannot
> be determined at runtime.

A new RTL function like...

  function QueryEncoding(S1: UnicodeString): StringEncodingType;

...could easily solve this problem. Plus, even though the string is
empty, the internal type structure information for that string variable
had to be setup, so the information about the encoding should exist.

> Fine for value parameters, but for var/out
> parameters the caller must know what data to assign.

Again, if you simply use UnicodeString, the var parameter and the local
UnicodeString variable inside the function/procedure should have the
same encoding by default - so no conversion would be needed.

And even if they were different, the compiler could easily to the
auto-conversion to match the var parameter (as I described in my first
paragraph above).


Regards,
  - Graeme -

-- 
fpGUI Toolkit - a cross-platform GUI toolkit using Free Pascal
http://fpgui.sourceforge.net/





More information about the Lazarus mailing list