On 11/26/2014 09:30 PM, Hans-Peter Diettrich wrote:
So seemingly you could do MyStringType = type
AnsiString(CP_UTF16), and seemingly the size information is set
according to this.
Not in Delphi XE.
Thanks for the clarification.
I did have some hope that fpc would be (or could be extended to be)
better than Delphi on that behalf.
I now do see the reason that resulted in the (to me rather queer) Naming
" AnsiString" for the code page aware string type. I erroneously
supposed the syntax that finally would be used would be something like
"MyStringType = type String(CP_UTF16)", with no restriction to
ANSI, but the CP_XXXX constant defining as well a code page as an
Element size, as suggested by the language syntax while working with
string using auto-conversion, and by the structure of the string content
header.
There still might be room for (fully compatible) improvement (as I
described in the Wiki), but it's even more difficult to do than I supposed.
Thanks again,
-Michael
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/cgi-bin/mailman/listinfo/fpc-devel