Bug 234628

Summary: console driver not properly using alternate character set
Product: Red Hat Enterprise Linux 5 Reporter: rich turner <rturner>
Component: kernelAssignee: Red Hat Kernel Manager <kernel-mgr>
kernel sub component: Other QA Contact: Red Hat Kernel QE team <kernel-qe>
Status: CLOSED WONTFIX Docs Contact:
Severity: medium    
Priority: medium CC: jgmyers
Version: 5.0   
Target Milestone: ---   
Target Release: ---   
Hardware: i686   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2014-06-02 13:06:03 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description rich turner 2007-03-30 18:02:58 UTC
Description of problem:
The console driver is not properly interpreting or using the alternate character
set mode, which causes all terminfo (Ncurses) applications which draw boxes to
display improperly. This problem does not occur on previous versions of RHEL or
versions of FedoraCore prior to 6. This does occur on FedoraCore6 and bugzilla
entry (217448) was submitted 11/27/06. The problem also does not occur when
using an xterm or native VT100 terminal.

Version-Release number of selected component (if applicable):
kernel 2.6.18-8.el5

How reproducible:
always

Steps to Reproduce:
1. Boot system to init level 3 (no Xwindows)
2. Make sure $TERM is set to "linux"
3. # echo -e "\033[11m\332\304\304\304\277\033[10m"

Actual results:
just a block displays on the screen. actually, it is multiple blocks that are
drawn upon each other.

Expected results:
cant show it to you here but it should have displayed the alternate character
set character for "upper-left corner", followed by 3 horizontal lines, followed
by "upper-right corner".

Additional info:
The following escape sequence is output by terminfo when TERM=linux and I turn
on the alternate character set, display a upper-left corner, three vertical
lines and an upper-right corner, then turn off the alternate character set mode:
# echo -e "\033[11m\332\304\304\304\277\033[10m"
("\033"=ESCAPE character, "["=left_bracket, "\"=backslash)

In this example:
    "\033[11m" turns on alternate character set
    "\332\304\304\304\277" draws UR corner, three vertical lines, UL corner
    "\033[10m" turns off alternate character set

The command "tput smacs" also turns on alternate character set by sending the
escape sequence provided by terminfo to the screen, and "tput rmacs" will turn
the mode off. Using "tput smacs >/tmp/out" and "od -c /tmp/out" verifies that
the correct escape sequences are being sent to the display.

The same escape sequences sent to the console on any previous version of
FedoraCore or RHEL display the box characters properly, but on RHEL5 and
FedoraCore 6, the smacs/rmacs sequence is apparently ignored and the box
characters therefore display garbage on the console.

Comment 1 Tomas Janousek 2007-04-02 14:53:06 UTC
This is completely unrelated to the console-tools package. Reassigning to kernel.

Comment 3 John G. Myers 2008-10-09 18:37:26 UTC
Another test case:

echo -e "\e(0qqq\e(B"

Works correctly when console is in non-utf8 mode (echo -e "\e%@") but incorrectly displayed in utf8 mode (echo -e "\e%G").

This is because do_conn_write() in drivers/char/vt.c does not send c through the translate[] array when utf is non-zero.  I'm not sure what the precise translation semantics should be in utf8 mode, but at the very least it should send characters <= 0x7f through the translate[] array.

The only other possible solution would be to have a separate terminfo entry for the utf8-mode console, with a different acsc property.  I haven't looked to see if ncursesw handles multi-octet utf8 sequences in the acsc string; I suspect it doesn't.  Even so, this would be an unwieldy solution.

Comment 4 RHEL Program Management 2014-03-07 12:42:33 UTC
This bug/component is not included in scope for RHEL-5.11.0 which is the last RHEL5 minor release. This Bugzilla will soon be CLOSED as WONTFIX (at the end of RHEL5.11 development phase (Apr 22, 2014)). Please contact your account manager or support representative in case you need to escalate this bug.

Comment 5 RHEL Program Management 2014-06-02 13:06:03 UTC
Thank you for submitting this request for inclusion in Red Hat Enterprise Linux 5. We've carefully evaluated the request, but are unable to include it in RHEL5 stream. If the issue is critical for your business, please provide additional business justification through the appropriate support channels (https://access.redhat.com/site/support).