- Remove configure-time endianness check
(replaced by run-time check to be optimized out by the compiler)
- Move loading functions into the util namespace
- Only keep the setup header entries we actually need
- Change conversion errors to warnings
- Only print one warning if iconv_open() fails
- Add a fall-back converter
- Replace bad code sequences and try to resume on the next byte
Some iconv implementations declare the second parameter of iconv() as
const char ** (FreeBSD), others as char ** (Linux, OS X).
This commit adds a workaround so that innoextract will compile with both
variants.
We need to pass "UTF-16LE" and not just "UTF-16" to iconv when
converting UTF-16 strings contained in unicode-aware Inno Setup files
as the latter is platform-dependent when there is no BOM.
While it worked fine under Linux, on OS X iconv aussmed UTF-16BE and
text would get garbled.
Fixes: bug #3