#include "convert.h"
#include "spider.h"
#include "http.h" /* for save_cookies */
+#include "iri.h"
#include <getopt.h>
#include <getpass.h>
#ifdef ENABLE_IRI
if (opt.enable_iri)
{
+ if (opt.locale && !check_encoding_name(opt.locale))
+ opt.locale = NULL;
+
if (!opt.locale)
- {
- opt.locale = getenv ("CHARSET");
+ opt.locale = find_locale ();
- if (opt.locale == NULL)
- opt.locale = nl_langinfo(CODESET);
- }
- else
- {
- /* sXXXav : check given locale */
- logprintf (LOG_VERBOSE, "Check the locale...\n");
- }
+ if (opt.encoding_remote && !check_encoding_name(opt.encoding_remote))
+ opt.encoding_remote = NULL;
+
+ logprintf (LOG_VERBOSE, "Locale = %s\n", quote (opt.locale));
}
#else
if (opt.enable_iri || opt.locale || opt.encoding_remote)