Bug 1273895

Summary: Printing troubles of wide and single-byte character sequences using LANG=C
Product: Red Hat Enterprise Linux 7 Reporter: David Kaspar // Dee'Kej <deekej>
Component: tcshAssignee: David Kaspar // Dee'Kej <deekej>
Status: CLOSED CURRENTRELEASE QA Contact: BaseOS QE - Apps <qe-baseos-apps>
Severity: medium Docs Contact:
Priority: medium    
Version: 7.2CC: bnater, hripps, isenfeld, ovasik, qe-baseos-apps, vvitek
Target Milestone: rcKeywords: Patch
Target Release: ---   
Hardware: x86_64   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: 717367 Environment:
Last Closed: 2016-03-31 10:56:35 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:
Bug Depends On: 717282, 717367    
Bug Blocks: 1289025, 1305230    

Description David Kaspar // Dee'Kej 2015-10-21 13:13:56 UTC
+++ This bug was initially created as a clone of Bug #717367 +++

Description of problem:
tcsh has some troubles with printing sequences of wide (eg. 'ö') and single-byte ASCII characters (eg. 'a') using LANG=C.

Version-Release number of selected component (if applicable):
tcsh-6.18.01-8.el7.x86_64

Steps to Reproduce:
1. Set LANG=C
2. Start tcsh
3. Type a wide character (eg. 'ö')
4. Type any single-byte ASCII character (eg. 'a')
  
Actual results:
The single character is printed 6 times instead of just once. For example when "öa" is typed, "aaaaaa" is printed.

Expected results:
The single character shall be printed just once, as expected.

Additional info:
The bug was revealed in bug 676305 comment 5.

--- Additional comment from Fridolín Pokorný on 2013-04-12 05:37:09 EDT ---

This bug was fixed in upstream in tcsh-6.17.03. Attached solution extracted from upstream patch.

Comment 2 David Kaspar // Dee'Kej 2016-03-31 10:56:35 UTC
For some reason I have cloned this BZ by a mistake. This issue is not present in current TCSH release, this has been already fixed in TCSH 6.17.03 (current base for RHEL7 is TCSH 6.18.01).

List of changes between 6.17.00 and 6.17.03:
https://github.com/tcsh-org/tcsh/compare/TCSH6_17_01...TCSH6_17_03

Commit fixing the issue:
https://github.com/tcsh-org/tcsh/commit/4a4fcdc792c0b
(You can easily lookup in the fist link that it is part of it.)

I have also tested the behaviour and it is correct:
-------------
~ export LANG=C
~ ./tcsh
$ (writing ö character)
$ \303\266