* arthur/xml_transform/image_crop.cc,
* arthur/xml_transform/loader.cc: Explicitly use UTF-8.
---
scribo/sandbox/ChangeLog | 7 +++++++
scribo/sandbox/arthur/xml_transform/image_crop.cc | 2 ++
scribo/sandbox/arthur/xml_transform/loader.cc | 2 ++
3 files changed, 11 insertions(+), 0 deletions(-)
diff --git a/scribo/sandbox/ChangeLog b/scribo/sandbox/ChangeLog
index 2779292..24b948f 100644
--- a/scribo/sandbox/ChangeLog
+++ b/scribo/sandbox/ChangeLog
@@ -1,3 +1,10 @@
+2010-11-25 Guillaume Lazzara <z(a)lrde.epita.fr>
+
+ Fix encoding issues in xml_transform.
+
+ * arthur/xml_transform/image_crop.cc,
+ * arthur/xml_transform/loader.cc: Explicitly use UTF-8.
+
2010-11-18 Guillaume Lazzara <z(a)lrde.epita.fr>
Improve image cropping in xml_transform.
diff --git a/scribo/sandbox/arthur/xml_transform/image_crop.cc
b/scribo/sandbox/arthur/xml_transform/image_crop.cc
index d2787f1..f439d8e 100644
--- a/scribo/sandbox/arthur/xml_transform/image_crop.cc
+++ b/scribo/sandbox/arthur/xml_transform/image_crop.cc
@@ -147,10 +147,12 @@ void ImageCrop::to_base64(const QString& out_file, bool
no_crop)
file.close();
file.open(QIODevice::ReadOnly);
QTextStream stream(&file);
+ stream.setCodec("UTF-8");
QFile file2(out_file);
file2.open(QIODevice::ReadWrite);
QTextStream stream2(&file2);
+ stream2.setCodec("UTF-8");
QString line = stream.readLine();
stream2 << line;
diff --git a/scribo/sandbox/arthur/xml_transform/loader.cc
b/scribo/sandbox/arthur/xml_transform/loader.cc
index f9316f2..c5527fd 100644
--- a/scribo/sandbox/arthur/xml_transform/loader.cc
+++ b/scribo/sandbox/arthur/xml_transform/loader.cc
@@ -164,6 +164,8 @@ bool Loader::xml_output(const QString& xml_file, bool html, const
QString& outpu
QTextStream stream_in(&file);
QTextStream stream_out(&out_file);
+ stream_in.setCodec("UTF-8");
+ stream_out.setCodec("UTF-8");
QString line = stream_in.readLine();
--
1.5.6.5
Show replies by date