Browse Source

Call setlocale() in the X11 driver to activate the current locale. If it

is an UTF-8 locale, more glyphs are displayed.
tags/v0.99.beta17
Sam Hocevar sam 15 years ago
parent
commit
6d943c6f02
1 changed files with 7 additions and 0 deletions
  1. +7
    -0
      caca/driver/x11.c

+ 7
- 0
caca/driver/x11.c View File

@@ -31,6 +31,9 @@
#include <stdio.h> /* BUFSIZ */ #include <stdio.h> /* BUFSIZ */
#include <stdlib.h> #include <stdlib.h>
#include <string.h> #include <string.h>
#if defined HAVE_LOCALE_H
# include <locale.h>
#endif


#include "caca.h" #include "caca.h"
#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); height = caca_get_canvas_height(dp->cv);
dp->resize.allow = 0; dp->resize.allow = 0;


#if defined HAVE_LOCALE_H
setlocale(LC_ALL, "");
#endif

dp->drv.p->dpy = XOpenDisplay(NULL); dp->drv.p->dpy = XOpenDisplay(NULL);
if(dp->drv.p->dpy == NULL) if(dp->drv.p->dpy == NULL)
return -1; return -1;


Loading…
Cancel
Save