On Sun, Jul 10, 2016 at 03:45:39PM +0200, Mikulas Patocka wrote:
> Package: ncurses-base
> Version: 6.0+20160319-2
> Severity: normal
> Tags: l10n
> 
> Dear Maintainer,
> 
> *** Reporter, please consider answering these questions, where appropriate ***
> 
>    * What led up to the situation?
> 
> Updating the ncurses-base package from 6.0+20160319-2 to 6.0+20160625-1 breaks
> the iso-8859-2 locale.
> 
> The reason for this bug is that the package 6.0+20160625-1 sends the 
> characters
> "\e(B\e)0" when initializing a full screen program. The code "\e(B" breaks the
> iso-8859-2 locale. (the locale needs "\e(K" so that it uses the alternate map,
> "\e(B" resets this setting to use the incorrect iso-8859-1 map)
> 
> The version 6.0+20160319-2 doesn't send the characters "\e(B\e)0" at
> initialization, so iso-8859-2 works there.

It's not that simple.

comparing linux2.2 to linux2.6.
    comparing booleans.
    comparing numbers.
    comparing strings.
        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',
 '++\,\,--..00__``aaffgghhiijjkkllmmnnooppqqrrssttuuvvwwxxyyzz{{||}c~~'.
        enacs: NULL, '\E(B\E)0'.
        rmacs: '\E[10m', '^O'.
        sgr: 
'\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;%?%p9%t;11%;m',
 
'\E[0;10%?%p1%t;7%;%?%p2%t;4%;%?%p3%t;7%;%?%p4%t;5%;%?%p5%t;2%;%?%p6%t;1%;m%?%p9%t\016%e\017%;'.
        sgr0: '\E[0;10m', '\E[m\017'.
        smacs: '\E[11m', '^N'.

The manual page console_codes states

   Character Sets
       The kernel knows about 4 translations of bytes into console-screen sym‐
       bols.  The four tables are: a) Latin1 -> PC, b) VT100 graphics  ->  PC,
       c) PC -> PC, d) user-defined.

       There  are two character sets, called G0 and G1, and one of them is the
       current character set.  (Initially G0.)  Typing ^N causes G1 to  become
       current, ^O causes G0 to become current.

       These  variables  G0  and  G1  point at a translation table, and can be
       changed by the user.  Initially they point at tables a) and b), respec‐
       tively.   The  sequences  ESC  (  B and ESC ( 0 and ESC ( U and ESC ( K
       cause G0 to point at translation table a), b), c) and d), respectively.
       The  sequences  ESC ) B and ESC ) 0 and ESC ) U and ESC ) K cause G1 to
       point at translation table a), b), c) and d), respectively.

That is, a hard reset would have the same effect, pointing G0/G1 to
the Latin1 and VT100 graphics tables.  The "reset" program does this.

Also, console_codes documents SGR:

       10      reset selected mapping, display control flag, and  toggle
               meta flag (ECMA-48 says "primary font").
       11      select null mapping, set display control flag, reset tog‐
               gle meta flag (ECMA-48 says "first alternate font").

...which is vague.  The source-code (drivers/tty/vt/vt.c) helps:

            case 10: /* ANSI X3.64-1979 (SCO-ish?) 
                  * Select primary font, don't display 
                  * control chars if defined, don't set 
                  * bit 8 on output. 
                  */
                vc->vc_translate = set_translate(vc->vc_charset == 0
                        ? vc->vc_G0_charset
                        : vc->vc_G1_charset, vc);
                vc->vc_disp_ctrl = 0;
                vc->vc_toggle_meta = 0;
                break;
            case 11: /* ANSI X3.64-1979 (SCO-ish?) 
                  * Select first alternate font, lets 
                  * chars < 32 be displayed as ROM chars. 
                  */
                vc->vc_translate = set_translate(IBMPC_MAP, vc);
                vc->vc_disp_ctrl = 1;
                vc->vc_toggle_meta = 0;
                break;

and

    case 14:
        vc->vc_charset = 1; 
        vc->vc_translate = set_translate(vc->vc_G1_charset, vc);
        vc->vc_disp_ctrl = 1;
        return;
    case 15:
        vc->vc_charset = 0;
        vc->vc_translate = set_translate(vc->vc_G0_charset, vc);
        vc->vc_disp_ctrl = 0;
        return;

It's a bit of a mess, but basically the old/new control codes don't work
together. (more later)

-- 
Thomas E. Dickey <dic...@invisible-island.net>
http://invisible-island.net
ftp://invisible-island.net

Attachment: signature.asc
Description: Digital signature

Reply via email to