mirror of
https://git.linuxfromscratch.org/lfs.git
synced 2025-06-18 19:29:21 +01:00
Use C.UTF-8 instead of C in console, and set the consolefont for it
This commit is contained in:
parent
7c630340c2
commit
4ecfc55ddb
@ -74,6 +74,20 @@
|
|||||||
|
|
||||||
</variablelist>
|
</variablelist>
|
||||||
|
|
||||||
|
<para>We'll use <literal>C.UTF-8</literal> as the locale for interactive
|
||||||
|
sessions in the Linux console in <xref role='.'
|
||||||
|
linkend='ch-config-locale'/> The only console font shipped by
|
||||||
|
the <application>Kbd</application> package containing the glyphs for
|
||||||
|
all characters from the program messages in the <literal>C.UTF-8</literal>
|
||||||
|
locale is <filename>Lat2-Terminus16</filename> (the other shipped console
|
||||||
|
fonts lack glyphs of some characters like the Unicode left/right
|
||||||
|
quotation marks and the Unicode English dash). So set
|
||||||
|
<filename>Lat2-Terminus16</filename> as the default console font:</para>
|
||||||
|
|
||||||
|
<!-- We are using "nodump" for general settings, but not examples. This
|
||||||
|
is ironic, but needed for the compatibility with jhalfs! -->
|
||||||
|
<screen role='nodump'><userinput>echo <literal>FONT=Lat2-Terminus16</literal> > /etc/vconsole.conf</userinput></screen>
|
||||||
|
|
||||||
<para>An example for a German keyboard and console is given below:</para>
|
<para>An example for a German keyboard and console is given below:</para>
|
||||||
<!-- This is what is used by jhalfs for creating the vconsole.conf file.
|
<!-- This is what is used by jhalfs for creating the vconsole.conf file.
|
||||||
Whenever you want to change the following, please inform the jhalfs
|
Whenever you want to change the following, please inform the jhalfs
|
||||||
|
@ -131,7 +131,7 @@ EOF</userinput></screen>
|
|||||||
determined to set the desired locale</phrase><phrase
|
determined to set the desired locale</phrase><phrase
|
||||||
revision='systemd'>to read the locale settings from
|
revision='systemd'>to read the locale settings from
|
||||||
<filename>/etc/locale.conf</filename> and export them</phrase>,
|
<filename>/etc/locale.conf</filename> and export them</phrase>,
|
||||||
but set the <literal>C</literal> locale instead if running in the Linux
|
but set the <literal>C.UTF-8</literal> locale instead if running in the Linux
|
||||||
console (to prevent programs from outputting characters that the Linux
|
console (to prevent programs from outputting characters that the Linux
|
||||||
console is unable to render):</para>
|
console is unable to render):</para>
|
||||||
|
|
||||||
@ -143,7 +143,7 @@ for i in $(locale); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$TERM" = linux ]]; then
|
if [[ "$TERM" = linux ]]; then
|
||||||
export LANG=C
|
export LANG=C.UTF-8
|
||||||
else
|
else
|
||||||
source /etc/locale.conf
|
source /etc/locale.conf
|
||||||
|
|
||||||
@ -166,7 +166,7 @@ for i in $(locale); do
|
|||||||
done
|
done
|
||||||
|
|
||||||
if [[ "$TERM" = linux ]]; then
|
if [[ "$TERM" = linux ]]; then
|
||||||
export LANG=C
|
export LANG=C.UTF-8
|
||||||
else
|
else
|
||||||
export LANG=<replaceable><ll>_<CC>.<charmap><@modifiers></replaceable>
|
export LANG=<replaceable><ll>_<CC>.<charmap><@modifiers></replaceable>
|
||||||
fi
|
fi
|
||||||
|
@ -432,6 +432,35 @@ EOF</userinput></screen>
|
|||||||
<para>Some examples:</para>
|
<para>Some examples:</para>
|
||||||
|
|
||||||
<itemizedlist>
|
<itemizedlist>
|
||||||
|
<listitem>
|
||||||
|
<para>
|
||||||
|
We'll use <literal>C.UTF-8</literal> as the locale for interactive
|
||||||
|
sessions in the Linux console in <xref role=','
|
||||||
|
linkend='ch-config-locale'/> so we should set
|
||||||
|
<literal>UNICODE</literal> to <literal>1</literal>. And the only
|
||||||
|
console font shipped by the <application>Kbd</application> package
|
||||||
|
containing the glyphs for all characters from the program messages
|
||||||
|
in the <literal>C.UTF-8</literal> locale is
|
||||||
|
<filename>Lat2-Terminus16</filename> (the other shipped console
|
||||||
|
fonts lack glyphs of some characters like the Unicode left/right
|
||||||
|
quotation marks and the Unicode English dash). So set
|
||||||
|
<filename>Lat2-Terminus16</filename> as the default console
|
||||||
|
font:
|
||||||
|
</para>
|
||||||
|
|
||||||
|
<!-- We are using 'nodump' for the generic setting, but not for an
|
||||||
|
example (see below). This is deliberate to keep the
|
||||||
|
compatibility with jhalfs. -->
|
||||||
|
<screen role='nodump'><userinput>cat > /etc/sysconfig/console << "EOF"
|
||||||
|
<literal># Begin /etc/sysconfig/console
|
||||||
|
|
||||||
|
UNICODE="1"
|
||||||
|
FONT="Lat2-Terminus16"
|
||||||
|
|
||||||
|
# End /etc/sysconfig/console</literal>
|
||||||
|
EOF</userinput></screen>
|
||||||
|
|
||||||
|
</listitem>
|
||||||
|
|
||||||
<listitem>
|
<listitem>
|
||||||
<para>For a non-Unicode setup, only the KEYMAP and FONT variables are
|
<para>For a non-Unicode setup, only the KEYMAP and FONT variables are
|
||||||
|
Loading…
Reference in New Issue
Block a user