[fpc-devel] Unicode RTL

Florian Klaempfl florian at freepascal.org
Wed Nov 16 14:13:04 CET 2005


Daniël Mantione wrote:

> 
> Op Wed, 16 Nov 2005, schreef Florian Klaempfl:
> 
> 
>>Daniël Mantione wrote:
>>
>>>Op Wed, 16 Nov 2005, schreef Micha Nelissen:
>>>
>>>
>>>
>>>>Daniël Mantione wrote:
>>>>
>>>>
>>>>>To be short, Juras B. wants to add a Unicode Win32 target, so in the
>>>>>standard RTL things like Tlist etc. use ansistrings, while in the Unicode
>>>>>RTL they use widestrings.
>>>>
>>>>Why not use ansistrings with UTF-8 ?
>>>
>>>
>>>Because then you will have to modify routines like pos, insert, delete. 
>>>Since that is not possible, you would get a pos_utf8, insert_utf8, etc.
>>
>>No, why? When working with utf-8 strings, you don't use character positions.
> 
> 
> pos('ë','Daniël');
> 
> ... has a different implementation for utf-8 and 8-bit code pages.

Why? With utf-8 a string is searched, with 8-bit cp one char. No other
char/sequence of char other than ë can generate the byte sequence representing ë




More information about the fpc-devel mailing list