[glom] Export: Correct problems in the binary data for images: Escape newlines.



commit 386a0ce31283e1b6aec6f5e950c450fa78395526
Author: Murray Cumming <murrayc murrayc com>
Date:   Mon Oct 5 11:43:04 2009 +0200

    Export: Correct problems in the binary data for images: Escape newlines.
    
    * glom/libglom/data_structure/field.cc: to_file_format(): Escape
    newlines as \012 instead of removing them, because this is probably
    what gda_binary_to_string() intends.

 ChangeLog                            |    8 ++++++++
 glom/libglom/data_structure/field.cc |    2 +-
 2 files changed, 9 insertions(+), 1 deletions(-)
---
diff --git a/ChangeLog b/ChangeLog
index 84a80f1..98b8d0b 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,11 @@
+2009-10-05  Murray Cumming  <murrayc murrayc-desktop>
+
+	Export: Correct problems in the binary data for images: Escape newlines.
+
+	* glom/libglom/data_structure/field.cc: to_file_format(): Escape 
+	newlines as \012 instead of removing them, because this is probably 
+	what gda_binary_to_string() intends. 
+
 2009-10-05  Murray Cumming  <murrayc murrayc com>
 
 	Export: Correct problems in the binary data for images.
diff --git a/glom/libglom/data_structure/field.cc b/glom/libglom/data_structure/field.cc
index f09b11e..1e36526 100644
--- a/glom/libglom/data_structure/field.cc
+++ b/glom/libglom/data_structure/field.cc
@@ -305,7 +305,7 @@ Glib::ustring Field::to_file_format(const Gnome::Gda::Value& value, glom_field_t
 
       //Avoid arbitrary newlines in this text.
       //See libgda bug: https://bugzilla.gnome.org/show_bug.cgi?id=597390
-      result = Utils::string_replace(result, "\n", "");
+      result = Utils::string_replace(result, "\n", "\\012");
 
       //Escape any quotes in this text:
       //See libgda bug: https://bugzilla.gnome.org/show_bug.cgi?id=597390



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