Using root shell, I can reproduce the problem using the command line
(not only reproducible in the dialog window)
Here's the system variable right after booting in Recovery mode took
from the root shell option.
---
$ echo $LANG
zh_CN.UTF-8
$ echo $LANGUAGE
zh_CN:zh
---
If I change manually the system variables as follow :
--
export LANG=C.UTF-8
export LANGUAGE=en
---
The situation disappear.
friendly-recovery have a blacklist including a detection for "zh_"
mechanism but doesn't seems to default $LANG and $LANGUAGE to good
working console value to avoid this situation to happen with CJK font.
I have tested the following approach and it works by displaying in english when
detect a known font which have not a good console output.
--
# blacklist some languages that we don't have a good console fonts for
# see bug #573502
in_lang_blacklist() {
LANG_BLACKLIST="ar_ he_IL ja_JP ko_KR ru_RU sl_SI vi_VN zh_"
LANG=$1
for b in $LANG_BLACKLIST; do
# equal to lang.startswith(b)
if expr match "$LANG" ^"$b" >/dev/null ; then
+ export LANG=C.UTF-8
+ export LANGUAGE=en
return 0
fi
done
return 1
}
# There is no environment set, as these steps are skipped,
# so we need to source the variables needed for localization ourselves
if [ -r /etc/default/locale ]; then
. /etc/default/locale
if ! in_lang_blacklist "$LANG"; then
export LANG LANGUAGE
fi
elif [ -r /etc/environment ]; then
. /etc/environment
if ! in_lang_blacklist "$LANG"; then
export LANG LANGUAGE
fi
fi
. gettext.sh
export TEXTDOMAIN=friendly-recovery
export TEXTDOMAINDIR=/usr/share/locale
---
** Changed in: friendly-recovery (Ubuntu Xenial)
Status: New => Confirmed
** Changed in: friendly-recovery (Ubuntu Artful)
Status: New => Confirmed
** Changed in: friendly-recovery (Ubuntu Bionic)
Status: New => Confirmed
** Changed in: friendly-recovery (Ubuntu Bionic)
Importance: Undecided => Medium
** Changed in: friendly-recovery (Ubuntu Bionic)
Assignee: (unassigned) => Eric Desrochers (slashd)
** Changed in: friendly-recovery (Ubuntu Bionic)
Status: Confirmed => In Progress
** Also affects: friendly-recovery (Ubuntu Trusty)
Importance: Undecided
Status: New
--
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1752362
Title:
garbled recovery mode in Simplified Chinese language OS install
To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/friendly-recovery/+bug/1752362/+subscriptions
--
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs