Commits

anatoly techtonik  committed 672d03a

Fix UnicodeDecode error when index is run from the terminal.

  • Participants
  • Parent commits eb9dc50

Comments (0)

Files changed (1)

         """
         # layer0: borders
         self.border_labels = []
-        label = pyglet.text.Label('╔'+ '═'*(self.width-2) + '╗', anchor_y='top',
-                    font_name=font_family, x=0, y=font_height*self.height)
+        label = pyglet.text.Label(u'╔'+ u'═'*(self.width-2) + u'╗',
+                    font_name=font_family, x=0, y=font_height*self.height,
+                    anchor_y='top',)
         self.border_labels.append(label)
         for x in range(1, self.height-1):
-            label = pyglet.text.Label('║' + ' '*(self.width-2) + '║',
-                        anchor_y='top', font_name=font_family, x=0, y=font_height*(x+1))
+            label = pyglet.text.Label(u'║' + ' '*(self.width-2) + u'║',
+                        font_name=font_family, x=0, y=font_height*(x+1),
+                        anchor_y='top')
             self.border_labels.append(label)
-        label = pyglet.text.Label('╚'+ '═'*(self.width-2) + '╝', anchor_y='top',
-                    font_name=font_family, x=0, y=font_height)
+        label = pyglet.text.Label(u'╚'+ u'═'*(self.width-2) + u'╝',
+                    font_name=font_family, x=0, y=font_height, anchor_y='top')
         self.border_labels.append(label)
 
     def _is_item_visible(self, idx):