Hi Ken,
No, it does not attempt the printf because ICONV_ENABLED=0
OK, so that's it: the test doesn't handle that case properly.
This begs a larger question ... should we just specify iconv as a
requirement for the next release?
You're thinking those without it, e.g. Andy, could easily get iconv with
a package install?
I'm not sure it makes sense to have all of those #ifdef HAVE_ICONV
directives cluttering up the code,
Well, there's not too many, and a few of them could be simpler to
understand if they didn't try to thread through a function but instead
just got the no-iconv case over with by returning, leaving the rest in
the #else, even if it means a little duplication, e.g. the return
statement.
In theory we should be testing things without iconv support to catch
these problems, but I don't think that's worth the time.
I'm doing that. I ./configure'd like normal and then s/1/0/ in Makefile
and config.h for HAVE_ICONV. All went well with `make all', one test
was skipped with `make check', but one test failed in
test/mhshow/test-charset, and I'm not sure why.
2014's 497a047e3 did
+test "$ICONV_ENABLED" -eq 0 && text_size=10 || text_size=11
...
-[ part - text/plain - bogus quoted-printable data 11B ]
+[ part - text/plain - bogus quoted-printable data ${text_size}B ]
but doesn't explain why. The test here runs with text_size=10 but `11B'
is printed; thus the failure. The quoted-printable-decoded input is ten
bytes, including the linefeed.
4 =F7 2 =3D 2
But the `=F7' becomes `c3 b7' causing the `11B'; here's the bytes in
hex.
34 20 c3 b7 20 32 20 3d 20 32 0a
That's U+F7 encoded as UTF-8, as if the `charset=windows-1252' was
converted. But how, without iconv?
--
Cheers, Ralph.
https://plus.google.com/+RalphCorderoy
--
Nmh-workers
https://lists.nongnu.org/mailman/listinfo/nmh-workers