[node-patches] Change in ovirt-node[master]: patch about support unicode in ovirt-node UI

boh.ricky at gmail.com boh.ricky at gmail.com
Fri Jul 12 05:12:25 UTC 2013


hai bo has uploaded a new change for review.

Change subject: patch about support unicode in ovirt-node UI
......................................................................

patch about support unicode in ovirt-node UI

Fix the problem occurred when switch the ovirt-node page sometimes.
The problem is like:
An error appeared in the UI: UnicodeEncodeError('ascii', u'\u25b2', 0, 1, 'ordinal not in range(128)')

Change-Id: I4aa419e0191149e068932051121fc6b9049f2cc9
Signed-off-by: boh.ricky <boh.ricky at gmail.com>
---
M src/ovirt/node/ui/urwid_builder.py
1 file changed, 5 insertions(+), 0 deletions(-)


  git pull ssh://gerrit.ovirt.org:29418/ovirt-node refs/changes/52/16752/1

diff --git a/src/ovirt/node/ui/urwid_builder.py b/src/ovirt/node/ui/urwid_builder.py
index 05900f3..14188bc 100644
--- a/src/ovirt/node/ui/urwid_builder.py
+++ b/src/ovirt/node/ui/urwid_builder.py
@@ -30,6 +30,11 @@
 
 
 class UrwidUIBuilder(ui.AbstractUIBuilder):
+    def __init__(self, application):
+        super(UrwidUIBuilder, self).__init__(application)
+        from urwid import set_encoding
+        set_encoding('utf8')
+
     def _build_container(self, ui_container):
         assert ui.ContainerElement in type(ui_container).mro()
         widgets = []


-- 
To view, visit http://gerrit.ovirt.org/16752
To unsubscribe, visit http://gerrit.ovirt.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: I4aa419e0191149e068932051121fc6b9049f2cc9
Gerrit-PatchSet: 1
Gerrit-Project: ovirt-node
Gerrit-Branch: master
Gerrit-Owner: hai bo <boh.ricky at gmail.com>



More information about the node-patches mailing list