[ocrfeeder] Fix encoding issues when exporting a text file
- From: Joaquim Manuel Pereira Rocha <jrocha src gnome org>
- To: commits-list gnome org
- Cc:
- Subject: [ocrfeeder] Fix encoding issues when exporting a text file
- Date: Mon, 15 Dec 2014 17:34:21 +0000 (UTC)
commit f73c3129919f06d871f5f4319f1c8336f2770199
Author: Joaquim Rocha <me joaquimrocha com>
Date: Mon Dec 15 17:30:55 2014 +0000
Fix encoding issues when exporting a text file
Also removes a redundant comment.
gb#737805
src/ocrfeeder/feeder/documentGeneration.py | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
---
diff --git a/src/ocrfeeder/feeder/documentGeneration.py b/src/ocrfeeder/feeder/documentGeneration.py
index c5b8cb5..ac38d1a 100644
--- a/src/ocrfeeder/feeder/documentGeneration.py
+++ b/src/ocrfeeder/feeder/documentGeneration.py
@@ -368,7 +368,7 @@ class PlaintextGenerator(DocumentGenerator):
# This will create a new file or **overwrite an existing file
f = open(self.name, "w")
try:
- f.write(self.text) # Write text to file
+ f.write(self.text.encode('utf-8'))
finally:
f.close() # Close the file
except IOError:
[
Date Prev][
Date Next] [
Thread Prev][
Thread Next]
[
Thread Index]
[
Date Index]
[
Author Index]