------- Comment #3 from tromey at gcc dot gnu dot org 2008-04-16 20:37 ------- I think some BOMs will be handled by iconv. In particular I tried UTF-16 and this seemed to work ok.
UTF-8 is a special problem in two ways. First, glibc's iconv does not appear to recognize the UTF-8 BOM. And, even if it did, we special-case UTF-8 (at least on non-EBCDIC hosts). This could be fixed in files.c without too much difficulty (it makes a few inconvenient assumptions), except that files.c does not know the name of the source charset. -- tromey at gcc dot gnu dot org changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |tromey at gcc dot gnu dot | |org http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33415