When the text presented to the encoding guesser is all ASCII, normally
the encoding guesser will report ASCII as its guess. But if the
fallback encoding is UTF-8, then it reports UTF-8 instead.
Unfortunately, this makes the encoding guesser a bit harder to test,
because guesses depend on the system's locale. It's easier to test
if all-ASCII always yields ASCII as the guess, so this changes the
encoding guesser to do that.
This fixes a test failure on Mac OS X. Thanks to Jeremy Lavergne for
reporting the problem.
|| !encoding_guess_tail_is_utf8 (data, n))
return fallback_encoding;
- if (!c_strcasecmp (fallback_encoding, "UTF-8")
- || !c_strcasecmp (fallback_encoding, "UTF8"))
- return "UTF-8";
-
return "ASCII";
}