Recover text from a legacy receipt
Admin ·
When imported characters look wrong, compare decodings of the original file. A short export can leave several encodings plausible, even when one choice produces a convincing preview.
Check the euro and quotation bytes in the receipt
Select Load legacy receipt example followed by Inspect encoding. The 13 bytes begin with 43 61 66 E9 and include 80, 93 and 94. The report is ambiguous for this small sample. Select windows-1252 in Preview as.
Look for Café followed by €5 on the first line and curly quotes around A7 on the next. Then select ISO-8859-1. This preview applies original ISO Latin-1 byte values, so the euro and curly quotes become control characters. Treat the recognizable punctuation as evidence and check the exporting application before changing a larger file.
| Original byte | Windows-1252 | Original ISO Latin-1 |
|---|---|---|
| E9 | é | é |
| 80 | € | U+0080 control |
| 93 | “ | U+0093 control |
| 94 | ” | U+0094 control |
Original Windows-1252 receipt bytesWHATWG Windows-1252 indexWHATWG encoding names, labels and decoder API
Save the selected decoding and inspect its UTF-8 bytes
Select windows-1252 again and choose Download UTF-8 text. Open the download in File bytes and inspect it again. The result should say Valid UTF-8. The euro sign is now three bytes, E2 82 AC, and the line break still uses 0D 0A.
If needed, save Download encoding report separately. The JSON includes the source byte count, header and any candidate scores. The text download contains the chosen interpretation. Keep the original file for a second comparison.
Original Windows-1252 receipt bytesIETF RFC 3629 UTF-8 byte sequences
Separate signatures and valid byte sequences from legacy scores
A byte-order mark suggests a Unicode encoding before decoding begins. The decoder then checks the bytes after the mark. A UTF-8 result without a mark comes from strict decoding of the entire file. ASCII-only content stays compatible with multiple encodings.
The legacy model samples the first 64 KiB. The scores compare byte-pattern matches. A close result or a later file section saved in a different encoding may need separate inspection.
Unicode byte-order marks and encoding formsWHATWG encoding names, labels and decoder APINode Chardet occurrence analysis and candidate scores
Common questions
Why does this ISO Latin-1 preview differ from a browser’s ISO-8859-1 page?
The web Encoding Standard maps ISO-8859-1 labels to Windows-1252. This tool also offers a literal ISO Latin-1 preview to help compare source formats.
What does an ASCII-only result establish?
Each byte is in the shared ASCII range. UTF-8 and many legacy decoders give identical text for that range, so check the exporter if source settings matter.
Sources
Put it into practice.
Related guides
- Convert Line Endings and Limit Blank Lines
- Find CRLF, Tabs and Non-Breaking Spaces
- Find Zero-Width Spaces and Keep Emoji Joiners
- Decode a UTF-8 Hex Field Note
- Choose the Right Byte-Order Mark
- Extract the Second Note Column
- Check a Windows-1252 to UTF-8 Conversion
- Trace Invalid UTF-8 at Exact Byte Offsets
- Trace One and Two Passes of UTF-8 Repair
- Read Octal Groups as UTF-8 Bytes
- Read Graphemes and Unicode Byte Offsets
- Decode Java Escapes Before YAML Export
- Check CSV Encoding Before Importing