I also came across this problem, and in my case it was due to this file:
I had to comment out three lines to get the installer to work on J 2.5.20 (working on a very old legacy site which needed a diff to be done against a vanilla installation!).
The lines I had to comment out:
// These are settings that can be set inside code
// iconv_set_encoding("internal_encoding", "UTF-8");
// iconv_set_encoding("input_encoding", "UTF-8");
// iconv_set_encoding("output_encoding", "UTF-8");
This let me go through the installation process thereafter.
Hope it helps somebody (and this comes with the usual caveat of you shouldn't be using 2.5.x, it's deprecated and outdated, etc)