On 09/15/2011 10:39 AM, Graeme Geldenhuys wrote:
MyChar := UTF8Copy(MyString, 1, 1);
The above example is safe,
Of course. But generations of Pascal programmers have been trained to do
MyChar := MyString[1];
So it would at least be candid to abolish the String[i] notation as a
syntax feature, as it does not provide the result "normal" (Unicode
unaware) users expect. (And provide an appropriate aromatically
correctly coding aware library call - hopefully supported by appropriate
syntax - candy instead). This of course would need either a dynamically
coded "NewDelphiString" Type or different types for different coding
variants.
-Michael
_______________________________________________
fpc-devel maillist - fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel