Source:   ncurses
Version:  5.9+20140913-1
Control:  affects -1  console-setup
Tags:     patch
Severity: minor

        As of the current version of the Terminfo database, the ‘linux’
        terminal entry implies the use of the CP437 encoding for the
        box-drawing characters and the like (also known as “alternate
        character set”, or ACS):

$ nl -ba < misc/terminfo.src 
…
  1577  linux-basic|linux console,
  1578          am, bce, eo, mir, msgr, xenl, xon,
  1579          it#8, ncv#18, U8#1,
  1580          
acsc=+\020\,\021-\030.^Y0\333`\004a\261f\370g\361h\260i\316j\331k\277l\332m\300n\305o~p\304q\304r\304s_t\303u\264v\301w\302x\263y\363z\362{\343|\330}\234~\376,

        (Read:  
acsc=+\020\,\021-\030.^Y0█`\004a▒f°g±h░i╬j┘k┐l┌m└n┼o~p─q─r─s_t├u┤v┴w┬x│y≤z≥{π|╪}£~■.
        And no, that’s /not/ line noise.)

        This is hardly a safe assumption these days, especially taking
        into account the widespread use of UTF-8, /including/ on ttys.

        (Please also note that the console-setup Debconf scripts will
        assume UTF-8 mode for ttys provided that the locale is a UTF-8
        one, – which, I believe, are default with D-I installs.)

        There’s a separate ‘linux-vt’ entry that’s intended to be used
        when the terminal encoding is not known, or non-unibyte, and
        which emits ACS characters using VT100 ESC sequences instead:

  1678  # This uses graphics from VT codeset instead of from cp437.
  1679  # reason: cp437 (aka "straight to font") is not functional under luit.
  1680  # from: Andrey V Lukyanov <l...@long.yar.ru>.
  1681  linux-vt|linux console using VT codes for graphics,
  1682          
acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz~~,
  1683          rmacs=\E(K, rmpch@, sgr@, sgr0=\E[0m\E(K\017, smacs=\E(0,
  1684          smpch@, use=linux,

        Unfortunately, this entry misses the ‘enacs’ capability, so its
        use doesn’t result in the proper ACS rendering, as in:

$ export TERM=linux-vt 
$ tput  enacs ; tput  smacs ; printf %s\\n lk mj ; tput  rmacs ; 
lk
mj

        Expected:

┌┐
└┘

        The /minimal/ solution for the issue is to fix the linux-vt
        entry by adding the missing ‘enacs’ capability:

linux-vt|linux console using VT codes for graphics,
        acsc=++\,\,--..00``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz~~,
        enacs=\E(B\E)0, rmacs=\E(K, rmpch@, sgr@, sgr0=\E[0m\E(K\017,
        smacs=\E(0, smpch@, use=linux,

        This could just as well be combined with explicitly passing
        ‘linux-vt’ to the getty(8) invocations in the default
        /etc/inittab for the new GNU/Linux installations, – or similar
        measures for the systems using different means to start up the
        gettys.

        The “proper” solution, in my opinion, is to:

        • move the current variants of the ‘acsc’, ‘smacs’, ‘rmacs’
          capabilities from linux-basic to a dedicated linux-cp437 entry
          (following the suit of linux-koi8, linux-koi8r, linux-lat);

        • replace them with the encoding-insensitive ‘acsc’, ‘smacs’,
          ‘rmacs’ variants from linux-vt, along with adding ‘enacs’ per
          above;

        • the linux-vt entry is then to be cut down to just ‘use=linux’
          (and ‘sgr@’?), but otherwise retained for compatibility.

        TIA.

-- 
FSF associate member #7257  http://boycottsystemd.org/  … 3013 B6A0 230E 334A


--
To UNSUBSCRIBE, email to debian-bugs-dist-requ...@lists.debian.org
with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org

Reply via email to