[orca] Python 3 compatibility fixes for brlapi



commit fb6eccc0b2a48d0821f043b0fc69798861207b74
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Mon Nov 5 06:55:13 2012 -0500

    Python 3 compatibility fixes for brlapi

 src/orca/braille.py |    4 ++--
 1 files changed, 2 insertions(+), 2 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 0bb68c5..1866ef3 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -1384,7 +1384,7 @@ def refresh(panToCursor=True,
             if attributeMask:
                 attributeMask += '\x00'
             writeStruct.regionSize += 1
-        writeStruct.text = substring
+        writeStruct.text = bytes(substring, 'UTF-8')
         writeStruct.cursor = cursorCell
 
         # [[[WDW - if you want to muck around with the dots on the
@@ -1403,7 +1403,7 @@ def refresh(panToCursor=True,
         #writeStruct.attrOr = myUnderline
 
         if attributeMask:
-            writeStruct.attrOr = attributeMask[startPos:endPos]
+            writeStruct.attrOr = bytes(attributeMask[startPos:endPos], 'UTF-8')
 
         if not _brlAPIRunning:
             init(_callback, settings.tty)



[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]