2011/9/15 Michael Schnell <mschn...@lumino.de>:
> Of course. But generations of Pascal programmers have been trained to do
>
> MyChar := MyString[1];

Such people should retrain if they want to switch to Unicode using
some instructions how to convert your application. If they do not
want, they should stay with Ansi. There is no automatic switch your
application to Unicode.


2011/9/15 Michael Schnell <mschn...@lumino.de>:
> On 09/15/2011 10:43 AM, cobines wrote:
>>
>> MyChar := MyString[1]
>>
>> appropriate function retrieves first unicode character, regardless of
>> encoding.
>
> MyChar is an 8 bit thingy and thus is not even able to hold a Unicode 'ä'
> (in what ever UTF).

If you assume MyChar is 8-bit, then you are using Ansi. MyChar should
be the same type as MyString. At best it could be UTF-32 encoded
32-bit value representing character but then you may lose info about
how the character is composed, unless you normalize. Plus in future
32-bit may be not enough.

--
cobines
_______________________________________________
fpc-devel maillist  -  fpc-devel@lists.freepascal.org
http://lists.freepascal.org/mailman/listinfo/fpc-devel

Reply via email to