[Commits] [SCM] claws branch, master, updated. 3.9.2-128-g76d08bc

colin at claws-mail.org colin at claws-mail.org
Thu Dec 5 12:03:24 CET 2013


The branch master of project "claws" (Claws Mail) has been updated
       via  76d08bcbc5cce95e3e546cc718b71e4e972035e0 (commit)
      from  dc2158a308abd87c9ca243e9097d2e202e8514cb (commit)


- Log -----------------------------------------------------------------
commit 76d08bcbc5cce95e3e546cc718b71e4e972035e0
Author: Colin Leroy <colin at colino.net>
Date:   Thu Dec 5 12:05:24 2013 +0100

    Better fix for bug #3009; conv_filename_to_utf8() converts strings
    in local filename encoding to UTF-8 even if local filename encoding
    is UTF-8, leading to double UTF-8 encoding.

diff --git a/src/folder.c b/src/folder.c
index b9a3dc3..676c7a9 100644
--- a/src/folder.c
+++ b/src/folder.c
@@ -334,9 +334,9 @@ XMLTag *folder_get_xml(Folder *folder)
 FolderItem *folder_item_new(Folder *folder, const gchar *name, const gchar *path)
 {
 	FolderItem *item = NULL;
-	
+
 	cm_return_val_if_fail(folder != NULL, NULL);
-	
+
 	if (folder->klass->item_new) {
 		item = folder->klass->item_new(folder);
 	} else {
@@ -346,7 +346,14 @@ FolderItem *folder_item_new(Folder *folder, const gchar *name, const gchar *path
 	cm_return_val_if_fail(item != NULL, NULL);
 
 	item->stype = F_NORMAL;
-	item->name = conv_filename_to_utf8(name);
+
+	if(!g_utf8_validate(name, -1, NULL)) {
+		item->name = g_malloc(strlen(name)*2+1);
+		conv_localetodisp(item->name, strlen(name)*2+1, name);
+	} else {
+		item->name = g_strdup(name);
+	}
+
 	item->path = g_strdup(path);
 	item->mtime = 0;
 	item->new_msgs = 0;

-----------------------------------------------------------------------

Summary of changes:
 src/folder.c |   13 ++++++++++---
 1 files changed, 10 insertions(+), 3 deletions(-)


hooks/post-receive
-- 
Claws Mail


More information about the Commits mailing list