mirror of
https://github.com/irssi/irssi.git
synced 2024-12-04 14:46:39 -05:00
Use g_get_charset to check if the locale codeset is UTF-8.
git-svn-id: http://svn.irssi.org/repos/irssi/trunk@4822 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
b44bcd68cb
commit
764f311a8b
@ -26,10 +26,6 @@
|
|||||||
#include "term.h"
|
#include "term.h"
|
||||||
#include "mainwindows.h"
|
#include "mainwindows.h"
|
||||||
|
|
||||||
#ifdef HAVE_NL_LANGINFO
|
|
||||||
# include <langinfo.h>
|
|
||||||
#endif
|
|
||||||
|
|
||||||
#ifdef HAVE_SYS_IOCTL_H
|
#ifdef HAVE_SYS_IOCTL_H
|
||||||
# include <sys/ioctl.h>
|
# include <sys/ioctl.h>
|
||||||
#endif
|
#endif
|
||||||
@ -143,6 +139,7 @@ static void read_settings(void)
|
|||||||
|
|
||||||
void term_common_init(void)
|
void term_common_init(void)
|
||||||
{
|
{
|
||||||
|
const char *dummy;
|
||||||
#ifdef SIGWINCH
|
#ifdef SIGWINCH
|
||||||
struct sigaction act;
|
struct sigaction act;
|
||||||
#endif
|
#endif
|
||||||
@ -154,12 +151,10 @@ void term_common_init(void)
|
|||||||
term_use_colors = term_has_colors() && settings_get_bool("colors");
|
term_use_colors = term_has_colors() && settings_get_bool("colors");
|
||||||
read_settings();
|
read_settings();
|
||||||
|
|
||||||
#if defined (HAVE_NL_LANGINFO) && defined(CODESET)
|
if (g_get_charset(&dummy)) {
|
||||||
if (strcmp(nl_langinfo(CODESET), "UTF-8") == 0) {
|
|
||||||
term_type = TERM_TYPE_UTF8;
|
term_type = TERM_TYPE_UTF8;
|
||||||
term_set_input_type(TERM_TYPE_UTF8);
|
term_set_input_type(TERM_TYPE_UTF8);
|
||||||
}
|
}
|
||||||
#endif
|
|
||||||
|
|
||||||
signal_add("beep", (SIGNAL_FUNC) term_beep);
|
signal_add("beep", (SIGNAL_FUNC) term_beep);
|
||||||
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
signal_add("setup changed", (SIGNAL_FUNC) read_settings);
|
||||||
|
Loading…
Reference in New Issue
Block a user