Commits

Victor Stinner  committed 5f3d138

hachoir-urwid: in non human mode, escape non-ascii characters of the description

  • Participants
  • Parent commits 88c81c3

Comments (0)

Files changed (1)

File hachoir-urwid/hachoir_urwid/urwid_ui.py

                 smart_display = False
             text += "= %s" % display
         if node.field.description and self.flags & self.display_description:
-            text += ": %s" % node.field.description
+            description = node.field.description
+            if not(self.flags & self.human_size):
+                description = makePrintable(description, "ASCII")
+            text += ": %s" % description
         if self.flags & self.display_size and node.field.size or self.flags & self.display_type:
             tmp_text = []
             if self.flags & self.display_type: