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

Is termwrap working as expected?



[Joey Hess]
> Of course it doesn't work if the necessary terminal programs are not
> installed by dbootstrap for the chosen languages. I'm also not sure
> if /etc/environment, which it sources, will have LANG set in it.

It is not set at the moment.  Should LANG and LANGUAGE be set in
/etc/environment or /root/dbootstrap_settings?  Both?

I suggest changing termwrap like this to make sure it is used no
matter where it is:

Index: termwrap
===================================================================
RCS file: /cvs/debian-boot/base-config/termwrap,v
retrieving revision 1.2
diff -u -3 -p -u -r1.2 termwrap
--- termwrap	2001/05/30 03:40:37	1.2
+++ termwrap	2002/02/28 19:32:29
@@ -15,12 +15,19 @@
 ######################################################################
 ##	Set some environment variables.
 ######################################################################
-# reads /etc/environment.
+# reads /root/dbootstrap_settings (from the boot floppies), and allow
+# overrides in /etc/environment.
+test -f /root/dbootstrap_settings && . /etc/dbootstrap_settings
 test -f /etc/environment && . /etc/environment
 
 # Set all locale related environment variables.
-LC_ALL=$LANG
-export LANG LC_ALL
+if [ ! -z "$LANG" ]; then
+    LC_ALL=$LANG
+    export LANG LC_ALL
+    if [ ! -z "$LANGUAGE" ]; then
+	export LANGUAGE
+    fi
+fi
 
 ######################################################################
 ##	Display usage if no argument.

That way the LANG variable will be available as intended.

But termwrap do not seem to check the charset, only the language.  How
is the charset chosen when using jfbterm?  Is it just pure luck, or is
there something else involved?  For Japanese, there are two valid
locales, ja_JP.UTF-8 and ja_JP.EUC-JP.  Which one will be used?



Reply to: