This fixes test encoding005 on Windows (Trac #10623).
mkIconvEncoding already has a reference to Trac Trac #10298, so I removed the comment below.
This looks sensible to me. I'm still a bit concerned that we might get this encoding business wrong, but not having a concrete example of breakage I can't really complain.
Thanks for handling this, @thomie!
Thanks for adding these.
Yeah, I'm always vaguely scared of such changes because encoding is so complex, but I'll buy it since it's mostly fixing the test suite.