RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 978080 - ssh seems to mishandle unicode characters > 1b when editing CLI
Summary: ssh seems to mishandle unicode characters > 1b when editing CLI
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: openssh
Version: 6.4
Hardware: Unspecified
OS: Unspecified
unspecified
low
Target Milestone: beta
: 6.5
Assignee: Petr Lautrbach
QA Contact: BaseOS QE Security Team
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-06-26 00:05 UTC by David Jaša
Modified: 2013-07-19 15:23 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-07-12 10:58:35 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)
env (2.94 KB, text/plain)
2013-07-19 13:10 UTC, David Jaša
no flags Details

Description David Jaša 2013-06-26 00:05:21 UTC
Description of problem:
when connected with RHEL 6 ssh to any host (localhost, remote F19 openssh/bash, remote OpenWRT dropbear/ash), terminal misbehaves when editing CLIs that contain 2 byte unicode characters - when the cursor is to the right of such character and you move left, the cursor gets in the middle of the character instead of left to it. In some remote systems (F19 with tmux), even some whitespace is inserted to the right of the characters...
Given that all the remote systems misbehave the same, local (X) terminal works ok, I suspect ssh client as the culprit
The system locale is cs_CZ.UTF-8

Version-Release number of selected component (if applicable):
openssh-5.3p1-84.1.el6.x86_64
bash-4.1.2-14.el6.x86_64

How reproducible:
always

Steps to Reproduce:
1. connect with ssh to some host
2. paste this command to the terminal, hit enter:
echo -n '' | hexdump
3. hit up arrow
4. paste 'š' character inside the apostrophes, hit enter
5. hit up arrow
6. move left to get the cursor right right of 'š' character, ie 'š|' (pipe sign is placeholder for the cursor)
7. move one more character to the right
8. paste 'š' character
9. hit enter again

Actual results:
4. you can see output like this:
0000000 a1c5                                   
0000002
or:
0000000 c5a1                                   
000000
depending on your architecture
8. you can notice that something goes wrong with the CLI
you see output like:
0000000 c5c5 a1a1                              
0000004
meaning that the second 'š' got pasted right into middle of first 'š'


Expected results:
4. the same
8. nothing gets wrong when editing cli - i.e.:
0000000 a1c5 a1c5                              
0000004
or:
0000000 c5a1 c5a1                              
0000004


Additional info:
when you hop from the beginning to the end and vice versa in plain shell (no tmux), the PS1 prompt gets eaten with each hop to the left

Comment 1 Petr Lautrbach 2013-06-27 13:25:13 UTC
I'm not able to reproduce your issue. What kind of xterminal do you use? Is it on rhel-6 or are you connected to rhel-6 via ssh? Are you on a physical console? Or is it a virtual and do you use vnc? spice?

Comment 2 David Jaša 2013-06-27 13:45:01 UTC
gnome-terminal on RHEL6.

Comment 3 Petr Lautrbach 2013-06-27 18:11:40 UTC
still can't reproduce. Random idea: how does your prompt PS1 or so looks like?

Comment 4 Petr Lautrbach 2013-07-12 10:58:35 UTC
If you can provide more information how to reproduce this issue, please attach them and reopen this bug.

Comment 5 David Jaša 2013-07-19 13:10:56 UTC
Created attachment 775801 [details]
env

Comment 6 David Jaša 2013-07-19 15:23:22 UTC
The observed behaviour was caused by setting LC_ALL to C, so there is no bug on ssh part indeed, just bogus configuration.


Note You need to log in before you can comment on or make changes to this bug.