This is the mail archive of the cygwin-developers mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: representing charsets


On Mar 31 22:14, Andy Koppe wrote:
> Corinna Vinschen wrote:
> > Actually the codesets for all LC_FOO categories is supposed to be stored
> > in the LC_FOO datastructure soon. ?So the call to __get_charset_name
> > should be performed in the __FOO_load_locale functions.
> >
> > Before you start I'd like to apply my patch from
> > http://sourceware.org/ml/newlib/2010/msg00221.html first.
> 
> Makes sense. Wow, that's quite a patch.
> 
> > ?This
> > already contains a change to nl_langinfo, which just fetches the
> > charset from the locale info. ?At least at this point your and my
> > patch would clash. ?With my patch, you only have to change the
> > __FOO_load_locale functions, but not nl_langinfo anymore.
> 
> 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. Also,
> I'm generally quite concerned about the amount of additional
> complexity and indirection being introduced there, but I better take
> those concerns to the newlib list.

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.
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.


Corinna

-- 
Corinna Vinschen                  Please, send mails regarding Cygwin to
Cygwin Project Co-Leader          cygwin AT cygwin DOT com
Red Hat


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]