← Back to team overview

group.of.nepali.translators team mailing list archive

[Bug 1752362] Re: garbled recovery mode in Simplified Chinese language OS install

 

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 नेपाली
भाषा समायोजकहरुको समूह, which is subscribed to Xenial.
Matching subscriptions: Ubuntu 16.04 Bugs
https://bugs.launchpad.net/bugs/1752362

Title:
  garbled recovery mode in Simplified Chinese language OS install

Status in friendly-recovery package in Ubuntu:
  In Progress
Status in friendly-recovery source package in Trusty:
  New
Status in friendly-recovery source package in Xenial:
  Confirmed
Status in friendly-recovery source package in Artful:
  Confirmed
Status in friendly-recovery source package in Bionic:
  In Progress

Bug description:
  [Impact]

  The menu is garbled in recovery mode when using CJK font in Linux
  console.

  [Test Case]

  1. Install Ubuntu with selected Simplified Chinese language.
  2. Boot to recovery mode.
  3. Most character won't be seen and appear in a square shape. 
  (See "Bug attachment" for a screenshot)

  [Regression Potential]

  Regression risk is low. The fix simply default the system variables to
  something the console can output when detecting a blacklisted LANG in
  lib/recovery-mode/l10n.sh.

  +           export LANG=C.UTF-8
  +           export LANGUAGE=en

  [Other Info]

  Old LP reference :
  https://bugs.launchpad.net/bugs/573502

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/friendly-recovery/+bug/1752362/+subscriptions