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

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

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.
> Absent that, we're considering adding some sort of ugly hack to Lintian to
> force the locales package to generate a UTF-8 locale if one isn't already
> available.  Unfortunately, there's no straightforward way to do that in
> Debian without doing things that are kind of questionable.

You can tell it to generate a locale to a local dir.

mkdir -p locales
localedef -i en_US -c -f UTF-8 locales/en_US.UTF-8
LOCPATH=`pwd`/locales your-thing-to-do

1KB		// Microsoft corollary to Hanlon's razor:
		//	Never attribute to stupidity what can be
		//	adequately explained by malice.

Reply to: