cpstrnew branch (was Re: [fpc-devel] Freepascal 2.4.0rc1 released)

Tomas Hajny XHajT03 at mbox.vol.cz
Wed Nov 11 13:42:09 CET 2009


On Wed, November 11, 2009 09:58, Graeme Geldenhuys wrote:
> Florian Klaempfl wrote:
>>
>> The constant encoding the code page requires 2 bytes,
>
> Could those become enum values instead, which means you can store up to
> 255 different code-page types in 1 byte. 255 should be sufficient to
> cover all available code-page constants (I think).
>
> Or couldn't that maybe be reduced to 6 bits for code page enum values,
> giving a total of 63 different values for code page types (still
> sufficient I think). And then the remaining 2 bits for element size. So
> total usage is still 1 byte.
 .
 .

I'm afraid that your assumption about the number of codepages is
incorrect. The MIBENUM value defined in list at
http://www.iana.org/assignments/character-sets goes up to 2059 at the
moment.

Tomas





More information about the fpc-devel mailing list