[evolution-ews/gnome-3-4] Bug #673349 - Missing charset breaks setting of utf-8 strings



commit 7feaf441d6ed488aef2f142869ba6ece3ee48d33
Author: Milan Crha <mcrha redhat com>
Date:   Mon Apr 2 18:06:54 2012 +0200

    Bug #673349 - Missing charset breaks setting of utf-8 strings

 src/server/e-ews-connection.c |    2 +-
 src/server/e-ews-message.c    |    2 +-
 src/server/e-soap-message.c   |    2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)
---
diff --git a/src/server/e-ews-connection.c b/src/server/e-ews-connection.c
index 29170e3..3c5a5ce 100644
--- a/src/server/e-ews-connection.c
+++ b/src/server/e-ews-connection.c
@@ -1444,7 +1444,7 @@ static void post_restarted (SoupMessage *msg, gpointer data)
 	printf("Working around libsoup bug with redirect\n");
 	g_object_set (msg, SOUP_MESSAGE_METHOD, "POST", NULL);
 
-	soup_message_set_request(msg, "text/xml", SOUP_MEMORY_COPY,
+	soup_message_set_request(msg, "text/xml; charset=utf-8", SOUP_MEMORY_COPY,
 				 (gchar *) buf->buffer->content,
 				 buf->buffer->use);
 }
diff --git a/src/server/e-ews-message.c b/src/server/e-ews-message.c
index 1c7e954..f929ef7 100644
--- a/src/server/e-ews-message.c
+++ b/src/server/e-ews-message.c
@@ -42,7 +42,7 @@ e_ews_message_new_with_header (const gchar *uri,
 		return NULL;
 	}
 
-	soup_message_headers_append (SOUP_MESSAGE (msg)->request_headers, "Content-Type", "text/xml");
+	soup_message_headers_append (SOUP_MESSAGE (msg)->request_headers, "Content-Type", "text/xml; charset=utf-8");
 	soup_message_headers_append (SOUP_MESSAGE (msg)->request_headers, "User-Agent",
 				     "Evolution/" VERSION);
 	soup_message_headers_append (SOUP_MESSAGE (msg)->request_headers,"Connection",  "Keep-Alive");
diff --git a/src/server/e-soap-message.c b/src/server/e-soap-message.c
index d293d4c..587d084 100644
--- a/src/server/e-soap-message.c
+++ b/src/server/e-soap-message.c
@@ -1078,7 +1078,7 @@ e_soap_message_persist (ESoapMessage *msg)
 	xmlDocDumpMemory (priv->doc, &body, &len);
 
 	/* serialize to SoupMessage class */
-	soup_message_set_request (SOUP_MESSAGE (msg), "text/xml",
+	soup_message_set_request (SOUP_MESSAGE (msg), "text/xml; charset=utf-8",
 				  SOUP_MEMORY_TAKE, (gchar *) body, len);
 }
 



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