From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eggs.gnu.org ([2001:4830:134:3::10]:43479) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9xLz-0000yH-JM for qemu-devel@nongnu.org; Fri, 18 Dec 2015 10:54:00 -0500 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1a9xLw-0007Ou-BR for qemu-devel@nongnu.org; Fri, 18 Dec 2015 10:53:59 -0500 Received: from mx1.redhat.com ([209.132.183.28]:53199) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1a9xLw-0007Oq-66 for qemu-devel@nongnu.org; Fri, 18 Dec 2015 10:53:56 -0500 Received: from int-mx10.intmail.prod.int.phx2.redhat.com (int-mx10.intmail.prod.int.phx2.redhat.com [10.5.11.23]) by mx1.redhat.com (Postfix) with ESMTPS id 8E7648C1BC for ; Fri, 18 Dec 2015 15:53:55 +0000 (UTC) From: Gerd Hoffmann Date: Fri, 18 Dec 2015 16:53:52 +0100 Message-Id: <1450454032-10069-1-git-send-email-kraxel@redhat.com> Subject: [Qemu-devel] [PATCH] gtk: fix utf8 strings in the ui List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: Gerd Hoffmann Commit "2cb5d2a gtk: use setlocale() for LC_MESSAGES only" restricts locate settings to LC_MESSAGES, to avoid bugs caused by locale-specific number printing (LC_NUMERIC) and possibly others. We need LC_CTYPE too to make messages with chars outside us-ascii work correctly. Add it. Reported-by: Kevin Wolf Tested-by: Kevin Wolf Signed-off-by: Gerd Hoffmann --- ui/gtk.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ui/gtk.c b/ui/gtk.c index 47b37e1..30407a5 100644 --- a/ui/gtk.c +++ b/ui/gtk.c @@ -2044,8 +2044,9 @@ void gtk_display_init(DisplayState *ds, bool full_screen, bool grab_on_hover) s->free_scale = FALSE; - /* LC_MESSAGES only. See early_gtk_display_init() for details */ + /* LC_MESSAGES+LC_CTYPE only. See early_gtk_display_init() for details */ setlocale(LC_MESSAGES, ""); + setlocale(LC_CTYPE, ""); bindtextdomain("qemu", CONFIG_QEMU_LOCALEDIR); textdomain("qemu"); -- 1.8.3.1