diff --git a/src/server.c b/src/server.c
index fd33c36..2960245 100644
--- a/src/server.c
+++ b/src/server.c
@@ -86,6 +86,17 @@ main (int argc, char **argv)
   }
 
   setlocale (LC_ALL, "");
+  /* If not UTF-8, try a few more for LC_CTYPE */
+  if (!g_get_charset (NULL)) {
+    char *ctype = setlocale(LC_CTYPE, NULL);
+    int len = strcspn(ctype, ".");
+    char *newctype = g_strdup_printf("%.*s.UTF-8", len, ctype);
+    setlocale (LC_CTYPE, newctype);
+  }
+  if (!g_get_charset (NULL))
+    setlocale (LC_CTYPE, "C.UTF-8");
+  if (!g_get_charset (NULL))
+    setlocale (LC_CTYPE, "en_US.UTF-8");
 
   terminal_i18n_init (TRUE);
 
