[Lazarus] Does Lazarus support a complete Unicode Component Library?
Michael Schnell
mschnell at lumino.de
Thu Feb 17 10:43:03 CET 2011
On 02/17/2011 12:02 AM, Hans-Peter Diettrich wrote:
>
> That's why such loops should be disallowed with Unicode strings, as
> kind of low level string handling.
Not only this, but the normal user would like to do
MyChar := MyString[Length(MyString];
to get the last character of a string.
This would only work if length is counted in Unicode characters
disallowing the use of length in stream I/O (such as file read) functions.
Thus IMHO the Length function name should be dumped and two new
functions (such as CharacterCount and ByteCount) should be introduced.
> For-Each loops may be acceptable as high level string handling, but
> with what type of the loop variable???
>
We obviously would need a UnicodeChar Type that holds the 32 Bit encoding.
But the said "quirks" can't be handled by this. I up till now don't
understand if - technically - these "quirks" are seen as a single
Unicode character or as a sequence of Unicode Characters. Nor do I
understand how they can be used in a decent way and if they are
necessary or just legacy.
-Michael
More information about the Lazarus
mailing list