[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Use, "Depends: locales-all|locales" or not



On Fri, Jan 08, 2010 at 10:50:25AM +0100, Adam Borowski wrote:
> On Thu, Jan 07, 2010 at 09:50:23AM -0800, Russ Allbery wrote:
> > The problem is that Lintian depends on locales, but it doesn't just depend
> > on the locales package.  Having locales installed doesn't help.  Lintian
> > specifically depends on having a UTF-8 locale available.
> > 
> > The best solution is to do something that ensures a C.UTF-8 locale is
> > always available.  This would also help other problems in Debian.
> 
> Hell yeah.  Get the glibs folks to make C.UTF-8 built-in like "ISO-8859-1"
> and "koi8-r" used to be, and you'll be my hero.  In the past, those were
> removed since they shouldn't be special cased above all other locales --
> but it's long overdue to give UTF-8 preferential treatment.
> 
> And since the set_locale() call has to read multiple files, it takes over
> 20% of typical process startup+shutdown time.

I looked at the glibc codebase to try to do this.  Unfortunately,
I was defeated by lack of time and the complexity of the code.

One weird thing is that all locale facets have the locale name
embedded in AFAICT.  This means that the ASCII charmap hard-
coded in for C is only usable by C unless there's some trickery
I'm unaware of.  The implication is that you need a UTF-8 charmap
for each UTF-8 locale you have in use!  There's no sharing.
I may be incorrect here, and hope I am, but that's what it looks
like reading the locale sources.

My main stumbling block is generating the C sources from the
existing locale data.  I presume since the C locale is so small
it may have been hand-written, but the Unicode tables are huge.
Does anyone have any ideas?  The generated locale files are
binary so aren't too accessible unless you can dump them as
parsable plaintext.


Regards,
Roger

-- 
  .''`.  Roger Leigh
 : :' :  Debian GNU/Linux             http://people.debian.org/~rleigh/
 `. `'   Printing on GNU/Linux?       http://gutenprint.sourceforge.net/
   `-    GPG Public Key: 0x25BFB848   Please GPG sign your mail.

Attachment: signature.asc
Description: Digital signature


Reply to: