aboutsummaryrefslogtreecommitdiffstats
path: root/widgets/misc/e-unicode.c
diff options
context:
space:
mode:
Diffstat (limited to 'widgets/misc/e-unicode.c')
-rw-r--r--widgets/misc/e-unicode.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/widgets/misc/e-unicode.c b/widgets/misc/e-unicode.c
index edb7d3ee17..93130741d1 100644
--- a/widgets/misc/e-unicode.c
+++ b/widgets/misc/e-unicode.c
@@ -577,6 +577,21 @@ e_utf8_to_locale_string (const gchar *string)
return e_utf8_to_locale_string_sized (string, strlen (string));
}
+gboolean
+e_utf8_is_ascii (const gchar *string)
+{
+ char c;
+
+ g_return_val_if_fail (string != NULL, FALSE);
+
+ for (; (c = *string); string++) {
+ if (c & 0x80)
+ return FALSE;
+ }
+
+ return TRUE;
+}
+
gchar *
e_utf8_gtk_entry_get_text (GtkEntry *entry)
{