>>> + /* If the specified encoding is UTF-16 or UTF-32, then make >>> + that more precise by deciding what endianness to use. */ >>> + if (strcasecmp (pt->encoding, "UTF-16") == 0) >>> + precise_encoding = decide_utf16_encoding (port, mode); >>> + else if (strcasecmp (pt->encoding, "UTF-32") == 0) >>> + precise_encoding = decide_utf32_encoding (port, mode); >> >> Ideally these comparisons would not be locale-dependent. Dunno. > > Yes, that would be preferable. We talked about adding an > 'ascii_strcasecmp' function. What file do you think it should be > defined in?
It would be a trivial function to write, of course, but there is a c-strcasecmp func in gnulib.