From eeb5d841840f3b4b2dc4c85d5aee0409638a020d Mon Sep 17 00:00:00 2001 From: Andrea Zagli Date: Sun, 3 Apr 2011 10:29:04 +0200 Subject: [PATCH] Correzione nell'export a csv. g_output_stream_write_all vuole il numero di byte da scrivere e non il numero di caratteri. --- src/utils.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/src/utils.c b/src/utils.c index db5e53b..043af3b 100644 --- a/src/utils.c +++ b/src/utils.c @@ -20,6 +20,7 @@ #include #endif +#include #include #include @@ -97,7 +98,7 @@ solipa_gtktreeiter_export_to_csv (GtkTreeModel *model, GtkTreeIter iter, error = NULL; if (!g_output_stream_write_all (ostream, - row, g_utf8_strlen (row, -1), NULL, NULL, &error)) + row, strlen (row), NULL, NULL, &error)) { g_warning ("Errore nella scrittura del file di output: %s", error != NULL && error->message != NULL ? error->message : "nessun dettaglio"); @@ -223,7 +224,7 @@ solipa_gtktreemodel_to_csv (GtkTreeModel *model, const gchar *filename, error = NULL; if (!g_output_stream_write_all (G_OUTPUT_STREAM (ostream), - row, g_utf8_strlen (row, -1), NULL, NULL, &error)) + row, strlen (row), NULL, NULL, &error)) { g_warning ("Errore nella scrittura del file di output: %s", error != NULL && error->message != NULL ? error->message : "nessun dettaglio"); -- 2.49.0