Bug 913822 - qpid-stat unable to redirect unicode characters.
Summary: qpid-stat unable to redirect unicode characters.
Keywords:
Status: CLOSED DUPLICATE of bug 972703
Alias: None
Product: Red Hat Enterprise MRG
Classification: Red Hat
Component: qpid-tools
Version: 2.3
Hardware: Unspecified
OS: Unspecified
low
medium
Target Milestone: ---
: ---
Assignee: Ernie
QA Contact: MRG Quality Engineering
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-02-22 08:30 UTC by Leonid Zhaldybin
Modified: 2014-11-09 22:39 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-05-15 12:30:57 UTC
Target Upstream Version:
Embargoed:


Attachments (Terms of Use)

Description Leonid Zhaldybin 2013-02-22 08:30:02 UTC
Description of problem:
Currently, the qpid-stat tool is able to display queues or exchanges information in case that unicode characters are used in the entities names. For example:

[root@lzhaldyb-rhel64x ~]# qpid-config add queue šššš
[root@lzhaldyb-rhel64x ~]# qpid-stat -q
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  27e49df9-d3d0-47f4-8269-c7fe30adc874:0.0       Y        Y        0     0      0       0      0        0         1     2
  šššš                                                             0     0      0       0      0        0         0     1

However, if the output of qpid-stat command is redirected to a pipe or to a file, it gets corrupted:

[root@lzhaldyb-rhel64x ~]# qpid-stat -q | grep -v blah
Queues
  queue                                     dur  autoDel  excl  msg   msgIn  msgOut  bytes  bytesIn  bytesOut  cons  bind
  =========================================================================================================================
  13be10d0-4f43-4c9d-ab24-89c285e45b40:0.0       Y        Y        0     0      0       0      0        0         1     2
Failed: UnicodeEncodeError - 'ascii' codec can't encode characters in position 2-5: ordinal not in range(128)

NOTE: the qpid-config tool does not have this problem:

[root@lzhaldyb-rhel64x ~]# qpid-config queues | grep -v blah
Queue Name                                Attributes
=================================================================
af2e5d7d-dc10-4b90-9721-de7c9a911e8a:0.0  auto-del excl 
šššš 

Version-Release number of selected component (if applicable):
qpid-tools-0.18-8

How reproducible:
100%

Steps to Reproduce:
1. Create a queue with non-ASCII characters in the name "qpid-config add queue šššš"
2. Run the qpid-stat tool and redirect its output to a pipe: "qpid-stat -q | cat"
3.
  
Actual results:
The non-ASCII name is not shown in the resulting output. There is an error instead from 'ascii' codec.

Expected results:
The non-ASCII characters are displayed properly even after their redirection.

Additional info:

Comment 1 Leonid Zhaldybin 2014-05-15 12:30:57 UTC

*** This bug has been marked as a duplicate of bug 972703 ***


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