[fpc-devel] Unicode support (yet again)
cobines
cobines at gmail.com
Thu Sep 15 11:40:10 CEST 2011
2011/9/15 Michael Schnell <mschnell at 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 <mschnell at 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
More information about the fpc-devel
mailing list