Changeset 4ecfc55


Ignore:
Timestamp:
01/28/2024 05:47:41 PM (3 months ago)
Author:
Xi Ruoyao <xry111@…>
Branches:
12.1, 12.1-rc1, multilib, trunk, xry111/arm64, xry111/clfs-ng, xry111/loongarch, xry111/loongarch-12.1, xry111/mips64el, xry111/update-glibc
Children:
40cd8a1
Parents:
7c630340
Message:

Use C.UTF-8 instead of C in console, and set the consolefont for it

Location:
chapter09
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • chapter09/consoled.xml

    r7c630340 r4ecfc55  
    7575  </variablelist>
    7676
     77  <para>We'll use <literal>C.UTF-8</literal> as the locale for interactive
     78  sessions in the Linux console in <xref role='.'
     79  linkend='ch-config-locale'/>  The only console font shipped by
     80  the <application>Kbd</application> package containing the glyphs for
     81  all characters from the program messages in the <literal>C.UTF-8</literal>
     82  locale is <filename>Lat2-Terminus16</filename> (the other shipped console
     83  fonts lack glyphs of some characters like the Unicode left/right
     84  quotation marks and the Unicode English dash). So set
     85  <filename>Lat2-Terminus16</filename> as the default console font:</para>
     86
     87  <!-- We are using "nodump" for general settings, but not examples.  This
     88       is ironic, but needed for the compatibility with jhalfs!  -->
     89<screen role='nodump'><userinput>echo <literal>FONT=Lat2-Terminus16</literal> &gt; /etc/vconsole.conf</userinput></screen>
     90
    7791  <para>An example for a German keyboard and console is given below:</para>
    7892<!-- This is what is used by jhalfs for creating the vconsole.conf file.
  • chapter09/locale.xml

    r7c630340 r4ecfc55  
    132132  revision='systemd'>to read the locale settings from
    133133  <filename>/etc/locale.conf</filename> and export them</phrase>,
    134   but set the <literal>C</literal> locale instead if running in the Linux
     134  but set the <literal>C.UTF-8</literal> locale instead if running in the Linux
    135135  console (to prevent programs from outputting characters that the Linux
    136136  console is unable to render):</para>
     
    144144
    145145if [[ "$TERM" = linux ]]; then
    146   export LANG=C
     146  export LANG=C.UTF-8
    147147else
    148148  source /etc/locale.conf
     
    167167
    168168if [[ "$TERM" = linux ]]; then
    169   export LANG=C
     169  export LANG=C.UTF-8
    170170else
    171171  export LANG=<replaceable>&lt;ll&gt;_&lt;CC&gt;.&lt;charmap&gt;&lt;@modifiers&gt;</replaceable>
  • chapter09/usage.xml

    r7c630340 r4ecfc55  
    433433
    434434  <itemizedlist>
     435    <listitem>
     436      <para>
     437        We'll use <literal>C.UTF-8</literal> as the locale for interactive
     438        sessions in the Linux console in <xref role=','
     439        linkend='ch-config-locale'/> so we should set
     440        <literal>UNICODE</literal> to <literal>1</literal>.  And the only
     441        console font shipped by the <application>Kbd</application> package
     442        containing the glyphs for all characters from the program messages
     443        in the <literal>C.UTF-8</literal> locale is
     444        <filename>Lat2-Terminus16</filename> (the other shipped console
     445        fonts lack glyphs of some characters like the Unicode left/right
     446        quotation marks and the Unicode English dash). So set
     447        <filename>Lat2-Terminus16</filename> as the default console
     448        font:
     449      </para>
     450
     451      <!-- We are using 'nodump' for the generic setting, but not for an
     452           example (see below).  This is deliberate to keep the
     453           compatibility with jhalfs.  -->
     454<screen role='nodump'><userinput>cat &gt; /etc/sysconfig/console &lt;&lt; "EOF"
     455<literal># Begin /etc/sysconfig/console
     456
     457UNICODE="1"
     458FONT="Lat2-Terminus16"
     459
     460# End /etc/sysconfig/console</literal>
     461EOF</userinput></screen>
     462
     463    </listitem>
    435464
    436465    <listitem>
Note: See TracChangeset for help on using the changeset viewer.