[ocrfeeder] Fixes encoding problem (gc#8)
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Fixes encoding problem (gc#8)
- Date: Thu, 4 Mar 2010 14:47:06 +0000 (UTC)
commit 59762019cc6df91d5eeebbd980d001b64519352e
Author: Joaquim Rocha <jrocha igalia com>
Date: Thu Mar 4 15:40:23 2010 +0100
Fixes encoding problem (gc#8)
feeder/ocrEngines.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/feeder/ocrEngines.py b/feeder/ocrEngines.py
index e59c95b..c9062e0 100644
--- a/feeder/ocrEngines.py
+++ b/feeder/ocrEngines.py
@@ -67,7 +67,7 @@ class Engine:
text = os.popen(self.engine_path + ' ' + parsed_arguments).read()
try:
try:
- text = unicode(text, 'latin-1', 'replace').encode('utf-8', 'replace')
+ text = unicode(text, 'utf-8', 'replace')
except UnicodeDecodeError:
text = unicode(text, 'ascii', 'replace').encode('utf-8', 'replace')
finally:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]