Bug 801560

Summary: multibyte characters cause odd formatting in CLI tool
Product: Red Hat Satellite Reporter: Corey Welton <cwelton>
Component: HammerAssignee: Miroslav Suchý <msuchy>
Status: CLOSED UPSTREAM QA Contact: Katello QA List <katello-qa-list>
Severity: medium Docs Contact:
Priority: low    
Version: 6.0.0CC: mmccune, msuchy
Target Milestone: UnspecifiedKeywords: Triaged
Target Release: Unused   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-09-19 18:14:54 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 Corey Welton 2012-03-08 20:35:09 UTC
Description of problem:

Discovered while testing bug #798323
When user enters multibyte characters as environments names, a resulting org list using the CLI gives somewhat messed up formatting

Version-Release number of selected component (if applicable):


How reproducible:


Steps to Reproduce:

1.  katello -u admin -p admin environment create --name="žluťoučký_kůň" --prior Library --org ACME_Corporation
2.  katello -u admin -p admin environment create --name="你好" --prior Library --org ACME_Corporation
3.  katello -u admin -p admin environment create --name="一个人" --prior Library --org ACME_Corporation
4.  katello -u admin -p admin environment create --name="一个" --prior Library --org ACME_Corporation
5.  katello -u admin -p admin environment create --name="información" --prior Library --org ACME_Corporation
6.  katello -u admin -p admin environment list --org ACME_Corporation

Actual results:

 Id   Name            Description   Org                Prior Environment  
-------------------------------------------------------------------------------------------------------------------------------------------
 1    Library         None          ACME_Corporation   None               
 2    dev                           ACME_Corporation   Library            
 3    qae                           ACME_Corporation   dev                
 6    stage                         ACME_Corporation   qae                
 7    PROD                          ACME_Corporation   stage              
 8    hotfix                        ACME_Corporation   Library            
 9    flerg                         ACME_Corporation   Library            
 18   žluťoučký_kůň   None          ACME_Corporation   Library            
 19   你好              None          ACME_Corporation   Library            
 20   一个人             None          ACME_Corporation   Library            
 21   一个              None          ACME_Corporation   Library            
 22   información     None          ACME_Corporation   Library       


As seen above, an env containing two multibyte chars pushes out the other columns by an extra space, despite being "shorter" in length. Subsequent lengths push it out another space each...  

 23   我很喜欢吃水煮鱼        None          ACME_Corporation   Library            

Expected results:

 1    Library         None          ACME_Corporation   None               
 2    dev                           ACME_Corporation   Library            
 3    qae                           ACME_Corporation   dev                
 6    stage                         ACME_Corporation   qae                
 7    PROD                          ACME_Corporation   stage              
 8    hotfix                        ACME_Corporation   Library            
 9    flerg                         ACME_Corporation   Library            
 18   žluťoučký_kůň   None          ACME_Corporation   Library            
 19   你好             None          ACME_Corporation   Library            
 20   一个人           None          ACME_Corporation   Library            
 21   一个             None          ACME_Corporation   Library            
 22   información     None          ACME_Corporation   Library       


Additional info:

Comment 2 Miroslav Suchý 2012-09-19 15:21:27 UTC
taking

Comment 3 Miroslav Suchý 2012-09-24 13:30:34 UTC
https://github.com/Katello/katello/pull/735

Comment 4 Mike McCune 2013-09-19 18:14:54 UTC
These bugs have been resolved in upstream projects for a period of months so I'm mass-closing them as CLOSED:UPSTREAM.  If this is a mistake feel free to re-open.