representing charsets

Andy Koppe
Fri Apr 2 19:32:00 GMT 2010

Corinna Vinschen:
>> I'd be tempted to replace the 'char *codeset' fields in the various
>> locale info structs with integer IDs as well, but the entanglement
>> with the _*_locale_buf buffers makes that rather complicated.
> If we use the enums as you proposed, and if we also add a table to
> newlib which maps the enums to charset names, then we could do that.

Unfortunately I can't see where to store the enums for the locale
category codesets, since __part_load_locale in newlib and the new
rebase_locale_buf in assume that the various lc_*_T
structs consist entirely of pointers.

> The next step then would be an offical API to allow the locale(1) tool
> to get the names of all supported codesets, rather than having to have
> a codeset list in the application itself.

Is there a (de facto) standard API for that?


ps: Could you attach the Cygwin counterpart of your big newlib locale patch?

More information about the Cygwin-developers mailing list