Latin-1 Mojibake Sequence Detector
Flag a narrow mojibake heuristic: Latin-1 characters corresponding to UTF-8 C2/C3 lead bytes followed by an 80–BF continuation byte; this is evidence rather than encoding identification.
Description
Mojibake is text whose bytes were decoded using an unsuitable encoding.
Mojibake is text whose bytes were decoded using an unsuitable encoding. Some UTF-8 bytes decoded as Latin-1 leave characteristic two-character sequences, but the same characters can also occur legitimately.1
Flag a narrow mojibake heuristic: Latin-1 characters corresponding to UTF-8 C2/C3 lead bytes followed by an 80–BF continuation byte; this is evidence rather than encoding identification.
When to use Latin-1 Mojibake Sequence Detector
Use this tool to flag a narrow mojibake heuristic: Latin-1 characters corresponding to UTF-8 C2/C3 lead bytes followed by an 80–BF continuation byte; this is evidence rather than encoding identification.
Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
How to use Latin-1 Mojibake Sequence Detector and understand its results
- Choose the original CSV text, decoded cell strings, byte values or counts requested by this tool. Use the stated delimiter, encoding, indexing and number/date convention.
- Enter values using the field table and calculation rules, then run the tool.
- Read suspiciousIndices. The explanation below defines the units, signs, ordering and any flags or placeholder values.
- If the tool reports an input issue, correct the values and run it again. Apply the stated assumptions when interpreting a successfully returned result.
| Input field | Meaning | Value type; see rules below | Requirement |
|---|---|---|---|
| values | Values | list of string; maximum length: 10000; minimum entries: 0; maximum entries: 10000 | Required |
Supply decoded cell strings. The tool searches each cell for the narrow sequence pattern and returns the zero-based indices of cells containing at least one match. A cell is listed once regardless of how many matches occur; the text itself is preserved.
suspicious = occurrence of U+00C2 or U+00C3 followed by U+0080…U+00BF Units, indexing, boundary conditions and exceptional cases are defined in the calculation rules above.
| Output field | Meaning | Value type |
|---|---|---|
| suspiciousIndices | Suspicious indices | list of integer; minimum: 0 |
{
"input": {
"values": [
"café",
"café",
"plain"
]
},
"output": {
"suspiciousIndices": [
0
]
}
} Limitations and assumptions
This is a heuristic on decoded text, not an encoding detector or repair operation. It can produce false positives for legitimate character combinations and miss mojibake produced by other lead bytes or encodings. Original bytes and their encoding history are needed for reliable repair.
Numeric inputs must be finite. Follow the calculation-specific rules for overflow, underflow and exceptional cases. Cell-string lists also have a combined text budget of 100,000 UTF-16 units per list. Missing required fields, extra fields, wrong value types and violations of the calculation rules are input errors.
Alternative or Complementary methods
Use Latin-1 Export Compatibility Warning: Report cells containing characters outside ISO-8859-1’s U+0000–U+00FF repertoire; Windows-1252 substitutions such as the euro sign are not accepted as Latin-1. For a complementary task, use UTF-16 BOM Encoding Check: Match initial UTF-16 and UTF-32 BOM byte prefixes as encoding hints, preferring the longest signature; FF FE 00 00 remains ambiguous with UTF-16 LE followed by NUL.
References
-
Latin-1 Mojibake Sequence Detector — tool.io
Similar or alternative tools
- Latin-1 Export Compatibility Warning
Report cells containing characters outside ISO-8859-1’s U+0000–U+00FF repertoire; Windows-1252 substitutions such as the euro sign are not accepted as Latin-1.
- UTF-16 BOM Encoding Check
Match initial UTF-16 and UTF-32 BOM byte prefixes as encoding hints, preferring the longest signature; FF FE 00 00 remains ambiguous with UTF-16 LE followed by NUL.