diff options
author | Matthias Andree <matthias.andree@gmx.de> | 2004-11-07 23:50:34 +0000 |
---|---|---|
committer | Matthias Andree <matthias.andree@gmx.de> | 2004-11-07 23:50:34 +0000 |
commit | b88a50bdd3b4223be5a235f20f275ca87c62a7bb (patch) | |
tree | 812734d81b06c38a3d12f76384845eedc38bc18a /fetchmail.c | |
parent | 45f96a4353f0ded18b0bbb9c854ed4804c401289 (diff) | |
download | fetchmail-b88a50bdd3b4223be5a235f20f275ca87c62a7bb.tar.gz fetchmail-b88a50bdd3b4223be5a235f20f275ca87c62a7bb.tar.bz2 fetchmail-b88a50bdd3b4223be5a235f20f275ca87c62a7bb.zip |
Provide iana_charset, a normalized IANA charmap name.
svn path=/trunk/; revision=3980
Diffstat (limited to 'fetchmail.c')
-rw-r--r-- | fetchmail.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/fetchmail.c b/fetchmail.c index 1756c73f..07ca6eb8 100644 --- a/fetchmail.c +++ b/fetchmail.c @@ -30,6 +30,10 @@ #endif /* HAVE_SETRLIMIT */ #include <sys/utsname.h> +#ifdef HAVE_LANGINFO_H +#include <langinfo.h> +#endif + #include "fetchmail.h" #include "socket.h" #include "tunable.h" @@ -120,6 +124,8 @@ static RETSIGTYPE donothing(int sig) lastsig = sig; } +char *iana_charset; + int main(int argc, char **argv) { int bkgd = FALSE; @@ -139,6 +145,11 @@ int main(int argc, char **argv) setlocale (LC_ALL, ""); bindtextdomain(PACKAGE, LOCALEDIR); textdomain(PACKAGE); + iana_charset = norm_charmap(nl_langinfo(CODESET)); /* normalize local + charset to + IANA charset. */ +#else + iana_charset = "US-ASCII"; #endif /* |