From 6d943c6f02e6ad3edd5ba244b1934b3ebbe583c3 Mon Sep 17 00:00:00 2001 From: Sam Hocevar Date: Thu, 17 Dec 2009 23:25:46 +0000 Subject: [PATCH] Call setlocale() in the X11 driver to activate the current locale. If it is an UTF-8 locale, more glyphs are displayed. --- caca/driver/x11.c | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/caca/driver/x11.c b/caca/driver/x11.c index 275a4bc..df922b3 100644 --- a/caca/driver/x11.c +++ b/caca/driver/x11.c @@ -31,6 +31,9 @@ #include /* BUFSIZ */ #include #include +#if defined HAVE_LOCALE_H +# include +#endif #include "caca.h" #include "caca.h" @@ -105,6 +108,10 @@ static int x11_init_graphics(caca_display_t *dp) height = caca_get_canvas_height(dp->cv); dp->resize.allow = 0; +#if defined HAVE_LOCALE_H + setlocale(LC_ALL, ""); +#endif + dp->drv.p->dpy = XOpenDisplay(NULL); if(dp->drv.p->dpy == NULL) return -1;