--- rxvt-unicode/src/init.C 2003/12/18 05:45:11 1.14 +++ rxvt-unicode/src/init.C 2003/12/18 07:31:19 1.15 @@ -1,7 +1,7 @@ /*--------------------------------*-C-*---------------------------------* * File: init.c *----------------------------------------------------------------------* - * $Id: init.C,v 1.14 2003/12/18 05:45:11 pcg Exp $ + * $Id: init.C,v 1.15 2003/12/18 07:31:19 pcg Exp $ * * All portions of code are copyright by their respective author/s. * Copyright (c) 1992 John Bovey, University of Kent at Canterbury @@ -797,6 +797,23 @@ * This should support all European type languages. */ void +rxvt_term::set_locale (const char *locale) +{ +#if HAVE_XSETLOCALE || HAVE_SETLOCALE + free (this->locale); + this->locale = strdup (setlocale (LC_CTYPE, "")); +#endif +#if HAVE_NL_LANGINFO + free (codeset); + codeset = strdup (nl_langinfo (CODESET)); + enc_utf8 = !STRCASECMP (codeset, "UTF-8") + || !STRCASECMP (codeset, "UTF8"); +#else + enc_utf8 = 1; +#endif +} + +void rxvt_term::init_xlocale () { #ifdef USE_XIM @@ -817,8 +834,6 @@ return; } - rxvt_setTermFontSet (this, 0); - /* see if we can connect yet */ rxvt_IMInstantiateCallback (Xdisplay, NULL, NULL); @@ -1124,7 +1139,6 @@ long vt_emask; #ifdef PREFER_24BIT - XSetWindowAttributes attributes; XWindowAttributes gattr;