[fpc-devel] Unicode functions

Daniël Mantione daniel.mantione at freepascal.org
Tue Aug 26 11:05:58 CEST 2008

Op Tue, 26 Aug 2008, schreef Graeme Geldenhuys:

> On Tue, Aug 26, 2008 at 9:19 AM, Graeme Geldenhuys
> <graemeg.lists at gmail.com> wrote:
>> project. Maybe we could use something there - it's written in Object
>> Pascal as well? The LPTK project used a BSD license.
> I had a quick look at the LPTK project source...  So I gather this
> implementations is totally rubbish?  First of all, a Unicode char is
> defined as a word (2 bytes), so that means it's only UCS2 compliant
> and not full Unicode UTF-16 (which is what we want).

For uppercasing/lowercasing it is correct to define a Unicode char as 2 

> Plus, it uses no
> lookup tables as far as I can see - frankly, I don't understand the
> code at all. :-)

The code is simple: If the char is in [#0..#255], it does a normal upcase, 
otherwise it sets the least significant  bit to zero. Seems not correct to 


More information about the fpc-devel mailing list