diff options
| author | Ted Ross <tross@apache.org> | 2012-07-20 14:25:14 +0000 |
|---|---|---|
| committer | Ted Ross <tross@apache.org> | 2012-07-20 14:25:14 +0000 |
| commit | 46f2f2974e5e92234fab3d7d28701aa0f8196d1f (patch) | |
| tree | 36d8ce67d2fdb07b46c9beda8e01cb894ef376e7 /tools | |
| parent | 011c183ab77eb0e37fa76c0feb7fa1d97e108a79 (diff) | |
| download | qpid-python-46f2f2974e5e92234fab3d7d28701aa0f8196d1f.tar.gz | |
QPID-4155 - Added utf-8 decode of strings in the CLI display utility
git-svn-id: https://svn.apache.org/repos/asf/qpid/trunk/qpid@1363795 13f79535-47bb-0310-9956-ffa450edef68
Diffstat (limited to 'tools')
| -rw-r--r-- | tools/src/py/qpidtoollibs/disp.py | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tools/src/py/qpidtoollibs/disp.py b/tools/src/py/qpidtoollibs/disp.py index a0c77370a5..53e7bee267 100644 --- a/tools/src/py/qpidtoollibs/disp.py +++ b/tools/src/py/qpidtoollibs/disp.py @@ -167,7 +167,7 @@ class Display: for head in heads: width = len (head) for row in rows: - cellWidth = len (unicode (row[col])) + cellWidth = len (unicode (row[col].decode('utf-8'))) if cellWidth > width: width = cellWidth colWidth.append (width + self.tableSpacing) @@ -187,9 +187,9 @@ class Display: line = self.tablePrefix col = 0 for width in colWidth: - line = line + unicode (row[col]) + line = line + unicode (row[col].decode('utf-8')) if col < len (heads) - 1: - for i in range (width - len (unicode (row[col]))): + for i in range (width - len (unicode (row[col].decode('utf-8')))): line = line + " " col = col + 1 print line |
