- if (!is_encoding_ascii_compatible (fallback_encoding)
- || !encoding_guess_tail_is_utf8 (data, n))
+ /* We've tried all the "giveaways" that make the encoding obvious. That
+ rules out, incidentally, all the encodings with multibyte units
+ (e.g. UTF-16, UTF-32). Our remaining goal is to try to distinguish UTF-8
+ from some ASCII-based fallback encoding. */
+
+ /* If the fallback encoding isn't ASCII compatible, give up. */
+ if (!is_encoding_ascii_compatible (fallback_encoding))