Bug 801560 - multibyte characters cause odd formatting in CLI tool
Summary: multibyte characters cause odd formatting in CLI tool
Keywords:
Status: CLOSED UPSTREAM
Alias: None
Product: Red Hat Satellite
Classification: Red Hat
Component: Hammer
Version: 6.0.0
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: Unspecified
Assignee: Miroslav Suchý
QA Contact: Katello QA List
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2012-03-08 20:35 UTC by Corey Welton
Modified: 2019-09-26 13:32 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2013-09-19 18:14:54 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

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.


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