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

Tomas Hajny XHajT03 at mbox.vol.cz
Wed Nov 11 13:55:24 CET 2009

On Wed, November 11, 2009 13:42, Tomas Hajny wrote:
> 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.

To avoid potential misunderstanding - the number of codepages is not 2059
(there are about 200 character sets listed there at the moment). Still,
the current number already goes beyond the 63 and in the future it may
possibly grow beyond 255 too. Moreover, this MIBENUM number is the only
standardized reference value as far as I know; apart from that, the
various codepage numbers are platform specific (btw, I still wonder how
this platform specific mapping is performed in the new concept).


More information about the fpc-devel mailing list