[fpc-pascal] Unicode file routines proposal

Luca Olivetti luca at ventoso.org
Tue Jul 1 09:09:23 CEST 2008


En/na Martin Schreiber ha escrit:

>> I'd say to take a look at how python managed to integrate unicode support:
>>
>> http://www.google.com/search?domains=www.python.org&sitesearch=www.python.o
>> rg&sourceid=google-search&q=unicode&submit=search
>>
> They have a UTF-16/UCS-2 internal representation, same as MSEgui which works 
> very well and is fast and handy BTW.

And len, slicing, etc. work as expected.
Note that if you need characters beyond $ffff you have to compile it
with wide unicode support, and in that case every character will use 4
bytes.

http://www.python.org/dev/peps/pep-0261/

I think the default is still to compile without wide unicode support (at 
least python under mandriva, that has no special configure option, is a 
narrow python build, while debian etch has a wide one).

Bye
-- 
Luca





More information about the fpc-pascal mailing list