I don't think, full UTF-16 really would be desirable desirable over UC-2.
Imagine you have a string of some million characters (e.g. a Book). All
functions that need to find the n-th character (like x[n], copy, ...)
would take forever, as they need to scan the complete string (if not
widestring is a rather complex tree-like format).
That is a solution to isolate such code and treat it different from the
rest, not to mutilate the unicode standard.
I just checked Turbo Delphi (which does have WideString operations, but
e.g. TMemo works just on normal strings, so WideStrings are concerted to
plain old ANSI strings when used with TMemo.Lines) on that behalf:
sizeof WideChar in fact is 2 (16 Bits).
Dumping a WideString shows that in fact the storage area of WideString
an array of 16 bit WideChars.
So WideString just uses UC2 (and not Unicode).
-Michael
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel