On Wed, Aug 19, 2015 at 05:38:39PM +0300, Eli Zaretskii wrote: > > Assign a character set as follows: > > - if the user specified a from-charset, use that > > - if the name is printable ASCII (in 0x20-0x7f), take ASCII > > - if the name is non-ASCII and valid UTF-8, take UTF-8 > > - otherwise take Unknown. > > I think this is simpler and produces the same results: > - if the user specified a from-charset, use that > - otherwise assume UTF-8
Simpler, but the results are not the same. If the from-charset is unknown, then any call of iconv will certainly lead to bad results. So there are only the two possibilities: (i) leave as-is (if that is the user's preference) (ii) make pure ASCII via hex escapes. Andries
