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

Language and locale setting in /root/dbootstrap_setting

[Petter Reinholdtsen]
> More testing shows that the LANGUAGE variable can be used when the
> country is unknown.  It only works when the LANG variable is set to an
> existing locale.  The nice ting about the LANGUAGE variable is that is
> accepts language codes, not locale names.

Apparently, someone knew this.  I checked the CVS log for
dbootstrap/util.c, and discovered that user aph inserted
LANGUAGE=<langcode> 2001-11-20.  Then the user pb changed this to
LANG=<langcode> 2002-01-07.  This obviously triggered the warning from
perl, and blade changed this to LANG_INST=<langcode> 2002-02-10.

There seem to be some confusion.  Why was LANGUAGE= changed to LANG=?

Which program is the intended receiver of this value?

I suggest setting something like this.  I'll have to investigate some
more to find out where to tell debootstrap to install locale.

Another thing I noticed was that the code i boot-floopies seem to
assume non-utf-8 is english, and that all translations is using utf-8.
Is this correct?  Should the default locale support utf-8 instead of
my suggested ISO-8859-1?

BTW: the latest debootstrap fail to build on arm and m68k.  MAKEDEV do
  not know 'usb'.  Check buildd logs for details.

Index: util.c
RCS file: /cvs/debian-boot/boot-floppies/utilities/dbootstrap/util.c,v
retrieving revision 1.69
diff -u -3 -p -u -r1.69 util.c
--- util.c      2002/02/10 19:30:14     1.69
+++ util.c      2002/02/11 23:26:46
@@ -670,8 +670,17 @@ check_pending_config(void)
     write_userconfig("CDROM", "true");

-  if ( lang != NULL )
-    write_userconfig("LANG_INST", lang->locale);
+  if ( lang != NULL ) {
+    /* Pick any C/POSIX compatible locale.  Make sure this locale is generated
+       by locale-gen. */
+    write_userconfig("LANG", "en_US.ISO-8859-1");
+    /* Specify which translation to use when displaying messages */
+    write_userconfig("LANGUAGE", lang->locale);
+    /* Keep perl quiet if the locale is missing */
+    write_userconfig("PERL_BADLANG", "0");
+  }

 #if #cpu(powerpc)

Reply to: