[orca] Handle traceback seen with embedded object chars in Yelp



commit efd90577b326455f5af45c477c5bd43f5ae29049
Author: Joanmarie Diggs <jdiggs igalia com>
Date:   Sat Jun 2 15:10:16 2012 -0400

    Handle traceback seen with embedded object chars in Yelp

 src/orca/braille.py |    5 ++++-
 1 files changed, 4 insertions(+), 1 deletions(-)
---
diff --git a/src/orca/braille.py b/src/orca/braille.py
index 91bfc8f..31de669 100644
--- a/src/orca/braille.py
+++ b/src/orca/braille.py
@@ -676,7 +676,10 @@ class Text(Region):
         [string, caretOffset, lineOffset] = \
                  orca_state.activeScript.getTextLineAtCaret(self.accessible,
                                                             self.startOffset)
-        string = string.decode("UTF-8")
+        try:
+            string = string.decode("UTF-8")
+        except:
+            pass
 
         cursorOffset = min(caretOffset - lineOffset, len(string))
 



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