Bug#746415: Patch for non-UTF-8
Osamu Aoki
osamu at debian.org
Mon Oct 27 14:53:47 UTC 2014
control: tags 746415 patch
I thought I send this message but I can not see this on BTS.
This bug is upstreamed and there is a proof of concept patch. Since
Debian jessie always supports C.UTF-8, this upstream proposed patch
should be the good patch.
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);
See
https://bug732127.bugzilla-attachments.gnome.org/attachment.cgi?id=279068
https://bugzilla.gnome.org/show_bug.cgi?id=732127
============
As for Matthias Urlichs's problem
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=746415#55
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=764649
I do not know if he has 2 problems. This may be partly due to the fact
he only has locales-all installed without locale. I wonder what happens
if he create /etc/default/locale with
LANG=en_US.UTF-8
or
LANG=C.UTF-8
if he is missing it. (I realized locale package can be removed now if
locales-all is installed. This leaves me with POSIX ("") as LANG
value.)
Osamu
More information about the pkg-gnome-maintainers
mailing list