Bug 39252

Summary: [syscons] [patch] syscons doesn't support 8-bit control characters
Product: Base System Reporter: Peter Jeremy <peter>
Component: kernAssignee: freebsd-bugs (Nobody) <bugs>
Status: Open ---    
Severity: Affects Only Me CC: emaste
Priority: Normal Keywords: patch
Version: 4.6-PRERELEASE   
Hardware: Any   
OS: Any   
Attachments:
Description Flags
file.diff none

Description Peter Jeremy 2002-06-14 00:20:02 UTC
	syscons supports a subset of ANSI x3.64 (see screen(4)) control
	sequences beginning with 'ESC [' but does not support the 8-bit
	equivalent of 'ESC [' (0x9b).  This causes problems when using
	syscons as a terminal emulator in 8-bit mode.

How-To-Repeat: 	The following two sequences should be equivalent - displaying
	"hello" in reverse video.  The first works correctly with syscons
	but the second displays " 7mhello m".

	$ printf '\033[7mhello\033[m\n'
	$ printf '\2337mhello\233m\n'
Comment 1 Андрей Чернов 2002-06-14 01:08:23 UTC
On Fri, Jun 14, 2002 at 09:10:36 +1000, Peter Jeremy wrote:

> 	syscons supports a subset of ANSI x3.64 (see screen(4)) control
> 	sequences beginning with 'ESC [' but does not support the 8-bit
> 	equivalent of 'ESC [' (0x9b).  This causes problems when using

Because 0x9b will be in conflict with national character sets.

-- 
Andrey A. Chernov
http://ache.pp.ru/
Comment 2 peter.jeremy 2002-06-14 02:06:57 UTC
On 2002-Jun-14 04:08:23 +0400, "Andrey A. Chernov" <ache@nagual.pp.ru> wrote:
>Because 0x9b will be in conflict with national character sets.

For which national character sets?  0x80 thru 0x9f are reserved for
control characters in ISO6429 and ISO8859.  Admittedly, IBM and
Microsoft defined graphics for all 256 character positions, but
syscons treats 0x00 thru 0x1f as control characters so the handling
is already inconsistent.

Maybe syscons needs some way to be told what are graphic characters and
what can be interpreted as control characters.

Peter
Comment 3 Андрей Чернов 2002-06-14 11:15:20 UTC
On Fri, Jun 14, 2002 at 11:06:57 +1000, Peter Jeremy wrote:
> On 2002-Jun-14 04:08:23 +0400, "Andrey A. Chernov" <ache@nagual.pp.ru> wrote:
> >Because 0x9b will be in conflict with national character sets.
> 
> For which national character sets?  0x80 thru 0x9f are reserved for

For example: KOI8-R, KOI8-U, CP866, CP437

> Microsoft defined graphics for all 256 character positions, but
> syscons treats 0x00 thru 0x1f as control characters so the handling
> is already inconsistent.

There is no national characters among lower controls for every charset I 
know.

> Maybe syscons needs some way to be told what are graphic characters and
> what can be interpreted as control characters.

As for VTxxx there can be escape sequence to turn 8bit controls on/off or 
vidcontrol flag, all with defaults to off.

-- 
Andrey A. Chernov
http://ache.pp.ru/
Comment 4 Eitan Adler freebsd_committer freebsd_triage 2017-12-31 08:01:43 UTC
For bugs matching the following criteria:

Status: In Progress Changed: (is less than) 2014-06-01

Reset to default assignee and clear in-progress tags.

Mail being skipped
Comment 5 Ed Maste freebsd_committer freebsd_triage 2020-06-08 15:11:18 UTC
This is still the case with vt/teken, but the console is now Unicode and U+009b is (only) the Control Sequence Introducer (CSI). That said I do not know that it's used in practice today.
Comment 6 Graham Perrin freebsd_committer freebsd_triage 2022-10-17 12:38:43 UTC
Keyword: 

    patch
or  patch-ready

– in lieu of summary line prefix: 

    [patch]

* bulk change for the keyword
* summary lines may be edited manually (not in bulk). 

Keyword descriptions and search interface: 

    <https://bugs.freebsd.org/bugzilla/describekeywords.cgi>