#239205 "reset changes a unicode console to non-unicode"

Package:
ncurses-bin
Source:
ncurses
Description:
terminal-related programs and man pages
Submitter:
SDiZ
Date:
2023-01-30 00:45:04 UTC
Severity:
normal
#239205#5
Date:
2004-03-21 14:21:23 UTC
From:
To:
I am not sure is this a console-tools bug..
I have tried
  `/etc/init.d/console-screen.sh restart`

I expect it would set all VT to utf-8 mode,
but, in fact, it only set the current vt to unicode..

and `reset` resets the console to non-unicode mode..

#239205#10
Date:
2004-04-15 16:42:44 UTC
From:
To:
retitle 239205 "reset changes a unicode console to non-unicode"
reassign 239205 ncurses-bin
thanks

If the locale has charset UTF-8, and the
VT is in unicode mode, then it should remain so
after 'reset', and vice versa.

Regards,
Alastair

#239205#19
Date:
2004-05-27 13:53:21 UTC
From:
To:
Reset just issues the terminal's standard reset sequence, \Ec\E]R for a
Linux VT.  The kernel chooses to clear the UTF-8 flag when it receives
a reset sequence.  If you don't want it to do that you'll have to
discuss with the kernel maintainer.

#239205#24
Date:
2004-05-31 21:06:12 UTC
From:
To:
Dé Déar, 2004-05-27 ag 09:53 -0400, scríobh Daniel Jacobowitz:

reset, being a user-space program, knows that the terminal should be in
UTF-8 mode if the locale says so; perhaps if the  locale charmap is
UTF-8, reset should send '\E%8' to put the VT into UTF-8 mode after
issuing reset?


Regards
Alastair

#239205#29
Date:
2004-05-31 22:10:42 UTC
From:
To:
Hmm, that I don't know.  I'll defer to Thomas - Thomas, do you have an
opinion on this?  I guess it would be a change in reset's traditional
behavior...

#239205#32
Date:
2004-05-31 23:10:11 UTC
From:
To:
reset should do what the terminfo says.  \E%8 looks too much like
hardcoded behavior, since it doesn't appear in the terminfo.  (You
could define an extension, e.g., a boolean flag which is used consistently
to tell what reset should do in this special case, but I'm afraid that
Linux console is unique in this respect, so the extension would be
useful only on Linux).

#239205#35
Date:
2004-05-31 23:52:25 UTC
From:
To:
Are there really no other terminals which have a capability string to
enter or exit UTF-8 mode?  I suppose for xterm, you have to start it in
UTF-8 mode or not.  So maybe the Linux terminal really is unique in
this respect.

Not sure what to do w.r.t. the bug report.  I'll think about it.

#239205#38
Date:
2004-06-01 00:04:22 UTC
From:
To:
xterm can enter/exit via escape sequence, but a reset doesn't change the
UTF-8 mode.

A quick test seems to show gnome-terminal and konsole don't reset it
either.

(my copy of mlterm seems to have stopped working as a result of last
week's upgrade, otherwise I'd comment on that too).

on my to-do list I've got to check/see if there's an escape sequence
that was overlooked.

#239205#41
Date:
2004-06-01 00:13:31 UTC
From:
To:
btw, \E%8 is marked obsolete in the console_codes manpage (\E%G is the
recommended one).

Also bear in mind that people use 'linux' terminfo for remote connections.
Changing behavior like this is a tradeoff between the sets of people you
want to appease/annoy.

#239205#46
Date:
2023-01-25 18:02:45 UTC
From:
To:
Going through some old bug reports…

Which would be rather undesirable anyway, at least in my opinion.

It also seems that the kernel's behavior (switching out of UTF-8 mode
when it receives a reset sequence) which caused the initial complaint
has changed, probably many years ago.

At least I am unable to reproduce the problem here with a 5.10 kernel
and am inclined to just close the bug.

Cheers,
       Sven

#239205#51
Date:
2023-01-30 00:37:30 UTC
From:
To:
It was fixed in 2007 (as a side-effect of a configuration parameter that
was removed).  See the "default_utf8" variable and reset_terminal() in

https://github.com/torvalds/linux/commit/2e8ecb9db0bcc19e1cc8bb51e9252fe6a86a9863

https://github.com/torvalds/linux/commit/77bf2bab91e4e7df361963451c7b9a803516438c

Before that change, it was not initialized (and false), so a \Ec would
revert it to Latin-1.

#239205#54
Date:
2023-01-30 00:37:30 UTC
From:
To:
It was fixed in 2007 (as a side-effect of a configuration parameter that
was removed).  See the "default_utf8" variable and reset_terminal() in

https://github.com/torvalds/linux/commit/2e8ecb9db0bcc19e1cc8bb51e9252fe6a86a9863

https://github.com/torvalds/linux/commit/77bf2bab91e4e7df361963451c7b9a803516438c

Before that change, it was not initialized (and false), so a \Ec would
revert it to Latin-1.