--- mail-client/evolution-2.8.2.1/addressbook/importers/evolution-csv-importer.c.orig	2007-04-27 10:16:48.000000000 -0300
+++ mail-client/evolution-2.8.2.1/addressbook/importers/evolution-csv-importer.c	2007-04-27 10:18:05.000000000 -0300
@@ -343,23 +343,26 @@
 	work_address = g_new0(EContactAddress, 1);
 	other_address = g_new0(EContactAddress, 1);
 	bday = g_new0(EContactDate, 1);
-	
+
+	if (!g_utf8_validate(ptr, -1, NULL))
+		ptr = g_convert(ptr, -1, "UTF-8", "ISO-8859-1", NULL, NULL, NULL);	
+
 	while(*ptr != '\n') {
 		value = g_string_new("");
 		while(*ptr != delimiter) {
 			if(*ptr == '\n')
 				break;
 			if(*ptr != '"') {
-				g_string_append_unichar(value, *ptr);
+				g_string_append_unichar(value, g_utf8_get_char(ptr));
 			}
 			else {
-				ptr++;
+				ptr = g_utf8_next_char(ptr);
 				while (*ptr != '"') {
-					g_string_append_unichar(value, *ptr);
-					ptr++;
+					g_string_append_unichar(value, g_utf8_get_char(ptr));
+					ptr = g_utf8_next_char(ptr);
 				}
 			}
-			ptr++;
+			ptr = g_utf8_next_char(ptr);
 		}
 		if(importer == OUTLOOK_IMPORTER) {
 			contact_field = csv_fields_outlook[i].contact_field;
@@ -482,7 +485,7 @@
 		i++;
 		g_string_free(value, TRUE);
 		if(*ptr != '\n')
-			ptr++;
+			ptr = g_utf8_next_char(ptr);
 	}
 	if(strlen(home_street->str) != 0)
 		home_address->street = g_strdup(home_street->str);
@@ -537,20 +540,20 @@
 		if (c == EOF)
 			return NULL;
 		if (c == '\n') {
-			g_string_append_unichar(line, c);
+			g_string_append_c(line, c);
 			break ;
 		}
 		if (c == '"') {
-			g_string_append_unichar(line, c);
+			g_string_append_c(line, c);
 			c = fgetc (f);
 			while (c != '"') {
-				g_string_append_unichar(line, c);
+				g_string_append_c(line, c);
 				c = fgetc (f);
 			}
-			g_string_append_unichar(line, c);
+			g_string_append_c(line, c);
 		}
 		else
-			g_string_append_unichar(line, c);
+			g_string_append_c(line, c);
 	}
 	
 	if(gci->count == 0 && importer != MOZILLA_IMPORTER) {
@@ -561,20 +564,20 @@
 			if (c == EOF)
 				return NULL;
 			if (c == '\n') {
-				g_string_append_unichar(line, c);
+				g_string_append_c(line, c);
 				break ;
 			}
 			if (c == '"') {
-				g_string_append_unichar(line, c);
+				g_string_append_c(line, c);
 				c = fgetc (f);
 				while (c != '"') {
-					g_string_append_unichar(line, c);
+					g_string_append_c(line, c);
 					c = fgetc (f);
 				}
-				g_string_append_unichar(line, c);
+				g_string_append_c(line, c);
 			}
 			else
-				g_string_append_unichar(line, c);
+				g_string_append_c(line, c);
 		}	
 		gci->count ++;
 	}
