diff options
author | Fumitoshi UKAI <ukai@debian.or.jp> | 2004-10-13 16:52:49 +0000 |
---|---|---|
committer | Fumitoshi UKAI <ukai@debian.or.jp> | 2004-10-13 16:52:49 +0000 |
commit | 646f90c69a7c0e6547d1a23f276cc371cdc83e7e (patch) | |
tree | 16873e54e42e49c694686d5975159b7eb7747c7b /libwc | |
parent | * [w3m-dev 04108] PIPE_BUF (diff) | |
download | w3m-646f90c69a7c0e6547d1a23f276cc371cdc83e7e.tar.gz w3m-646f90c69a7c0e6547d1a23f276cc371cdc83e7e.zip |
Bug#276246: w3m's locale parsing should at least see '@euro' modifier
* config.h (HAVE_LANGINFO_CODESET): added
* configure.in (AM_LANGINFO_CODESET): added
* libwc/charset.c: #include <langinfo.h>
(wc_charset_to_ces): use nl_langinfo(CODESET)
From: Fumitoshi UKAI <ukai@debian.or.jp>
Diffstat (limited to '')
-rw-r--r-- | libwc/charset.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/libwc/charset.c b/libwc/charset.c index 95343b3..e64b6f6 100644 --- a/libwc/charset.c +++ b/libwc/charset.c @@ -6,6 +6,10 @@ #include "wc.h" +#ifdef HAVE_LANGINFO_CODESET +#include <langinfo.h> +#endif + wc_locale WcLocale = 0; static struct { @@ -369,6 +373,12 @@ wc_locale_to_ces(char *locale) if (*p == 'C' && *(p+1) == '\0') return WC_CES_US_ASCII; +#ifdef HAVE_LANGINFO_CODESET + { + char *cs = nl_langinfo(CODESET); + return wc_charset_to_ces(cs); + } +#endif for (n = 0; *p && *p != '.' && n < 5; p++) { if ((unsigned char)*p > 0x20) buf[n++] = tolower(*p); |