[orca] Fix for bug 672446 - Yet another UnicodeDecodeError
- From: Joanmarie Diggs <joanied src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [orca] Fix for bug 672446 - Yet another UnicodeDecodeError
- Date: Wed, 4 Apr 2012 15:24:59 +0000 (UTC)
commit 46f1da57417b2cfefafc667478b55a865f34ab58
Author: Joanmarie Diggs <jdiggs igalia com>
Date: Wed Apr 4 11:24:10 2012 -0400
Fix for bug 672446 - Yet another UnicodeDecodeError
src/orca/braille_generator.py | 5 +++++
1 files changed, 5 insertions(+), 0 deletions(-)
---
diff --git a/src/orca/braille_generator.py b/src/orca/braille_generator.py
index e41c924..fa55333 100644
--- a/src/orca/braille_generator.py
+++ b/src/orca/braille_generator.py
@@ -385,6 +385,11 @@ class BrailleGenerator(generator.Generator):
while content and isinstance(content[-1], Space):
content = content[0:-1]
for element in content:
+ try:
+ element = element.decode("UTF-8")
+ except UnicodeEncodeError:
+ pass
+
if isinstance(element, Space) and prior:
combined += element.delimiter
prior = None
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]