* WOps, forgot to take into account quoted address names.
With this we really fix NB#62993.
pmo-trunk-r2857
gunichar c;
gunichar next_c;
gint i= 0;
gunichar c;
gunichar next_c;
gint i= 0;
+ gboolean quoted = FALSE;
const gchar *current, *next_current;
if (text == NULL)
return TRUE;
const gchar *current, *next_current;
if (text == NULL)
return TRUE;
next_c = g_utf8_get_char (g_utf8_next_char (current));
else
next_c = 0;
next_c = g_utf8_get_char (g_utf8_next_char (current));
else
next_c = 0;
- if (c == g_utf8_get_char(",") || c == g_utf8_get_char (";")) {
+ if (!quoted && ((c == g_utf8_get_char(",") || c == g_utf8_get_char (";")))) {
if ((next_c != 0) && (next_c != g_utf8_get_char ("\n")))
return FALSE;
}
if ((next_c != 0) && (next_c != g_utf8_get_char ("\n")))
return FALSE;
}
c == g_utf8_get_char ("\n") ||
c == g_utf8_get_char ("\t"))
return FALSE;
c == g_utf8_get_char ("\n") ||
c == g_utf8_get_char ("\t"))
return FALSE;
+ if (c == g_utf8_get_char ("\""))
+ quoted = !quoted;
current = g_utf8_next_char (current);
i = current - text;
}
current = g_utf8_next_char (current);
i = current - text;
}
gunichar next_c;
gint i= 0;
GString *str;
gunichar next_c;
gint i= 0;
GString *str;
+ gboolean quoted = FALSE;
const gchar *current, *next_current;
if (text == NULL)
const gchar *current, *next_current;
if (text == NULL)
c != g_utf8_get_char ("\n") &&
c != g_utf8_get_char ("\t"))
str = g_string_append_unichar (str, c);
c != g_utf8_get_char ("\n") &&
c != g_utf8_get_char ("\t"))
str = g_string_append_unichar (str, c);
- if (c == g_utf8_get_char(",") || c == g_utf8_get_char (";")) {
+ if (!quoted && ((c == g_utf8_get_char(",") || c == g_utf8_get_char (";")))) {
if ((next_c != 0) && (next_c != g_utf8_get_char ("\n")))
str = g_string_append_c (str, '\n');
}
if ((next_c != 0) && (next_c != g_utf8_get_char ("\n")))
str = g_string_append_c (str, '\n');
}
+ if (c == g_utf8_get_char ("\""))
+ quoted = !quoted;
current = g_utf8_next_char (current);
i = current - text;
}
current = g_utf8_next_char (current);
i = current - text;
}