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

Marco van de Voort marcov at stack.nl
Wed Nov 11 20:53:43 CET 2009


In our previous episode, Tomas Hajny said:
> >    begin
> >      encoding:=windowsencoding2nativeencoding[encoding];
> >    end;
> >
> > Delphi users would only have to define the fpc constants of (2) to their
> > respective windows codepages to keep the code working.
> 
> Well... How do you make sure that MS doesn't come with an extension of the
> supported codepages in the next version of MS Windows (or that they don't
> support a different list in some special version, like a version for the
> Chinese market) breaking your selection of "50 free values in Windows
> range"?

In that unlikely case, change the range.

> How does your list of "50 values" compare to 280 lines provided by (GNU)
> recode -l (presumably matching to high extent to values supported by the
> underlying libiconv library)? 

Like about 50/280. That's the point of "most used". For the less likely
ones, define constants to the windows codepages.

Note that is all just a guestimate on the size of the free ranges. But I
rather not expand that too much.

> Isn't it necessary to also keep the character set names under Unix (as far
> as I understand it, at least console character set information is provided
> using charset name provided in an environment variable there)?

Put them in the table too, for Unix.

But what is the alternative? Delphi incompability ? Everything homemade and
incompatible?  



More information about the fpc-devel mailing list