summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohn Mark Bell <jmb@netsurf-browser.org>2009-10-12 16:56:30 (GMT)
committer John Mark Bell <jmb@netsurf-browser.org>2009-10-12 16:56:30 (GMT)
commit7bbc7d26bdc5ec1c129942c6693cfca531c420d3 (patch)
tree6eda313dab9a082a492268cf78130aa9ec45e816
parent06c2f22b53bdd978a6f9de265951bda8d1401937 (diff)
downloadlibparserutils-7bbc7d26bdc5ec1c129942c6693cfca531c420d3.tar.gz
libparserutils-7bbc7d26bdc5ec1c129942c6693cfca531c420d3.tar.bz2
Ensure we use the canonical charset name when invoking iconv_open()
svn path=/trunk/libparserutils/; revision=9628
-rw-r--r--src/input/filter.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/input/filter.c b/src/input/filter.c
index 4c02aa0..45e0b56 100644
--- a/src/input/filter.c
+++ b/src/input/filter.c
@@ -393,7 +393,8 @@ parserutils_error filter_set_encoding(parserutils_filter *input,
}
input->cd = iconv_open(
- parserutils_charset_mibenum_to_name(input->int_enc), enc);
+ parserutils_charset_mibenum_to_name(input->int_enc),
+ parserutils_charset_mibenum_to_name(mibenum));
if (input->cd == (iconv_t) -1) {
return (errno == EINVAL) ? PARSERUTILS_BADENCODING
: PARSERUTILS_NOMEM;