You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@qpid.apache.org by tr...@apache.org on 2012/07/20 16:25:14 UTC
svn commit: r1363795 - /qpid/trunk/qpid/tools/src/py/qpidtoollibs/disp.py
Author: tross
Date: Fri Jul 20 14:25:14 2012
New Revision: 1363795
URL: http://svn.apache.org/viewvc?rev=1363795&view=rev
Log:
QPID-4155 - Added utf-8 decode of strings in the CLI display utility
Modified:
qpid/trunk/qpid/tools/src/py/qpidtoollibs/disp.py
Modified: qpid/trunk/qpid/tools/src/py/qpidtoollibs/disp.py
URL: http://svn.apache.org/viewvc/qpid/trunk/qpid/tools/src/py/qpidtoollibs/disp.py?rev=1363795&r1=1363794&r2=1363795&view=diff
==============================================================================
--- qpid/trunk/qpid/tools/src/py/qpidtoollibs/disp.py (original)
+++ qpid/trunk/qpid/tools/src/py/qpidtoollibs/disp.py Fri Jul 20 14:25:14 2012
@@ -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
---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@qpid.apache.org
For additional commands, e-mail: commits-help@qpid.apache.org