Weird Characters in Text Files: Encoding Diagnosis
Mojibake and replacement characters often appear when a file is decoded with the wrong character encoding.
Step-by-step troubleshooting
- 01
Preserve raw bytes
Save a backup before opening and resaving text in another editor.
- 02
Inspect any BOM
Use Text Encoding and BOM Checker to detect UTF-8 or UTF-16 markers.
- 03
Check UTF-8 validity
Invalid UTF-8 sequences may mean the file uses a legacy encoding or has damage.
- 04
Choose the correct encoding
If you know the source application, reopen using its documented encoding.
- 05
Clean only after confirming
The Text File Cleaner changes text output; review characters before saving a replacement.
Check before repairing.
Run an appropriate browser-side check to understand what can be verified about the file.
Open Text Encoding and BOM Checker ↗What if the file is still broken?
Structural checks can identify evidence of truncation, checksum errors or a format mismatch, but a successful check does not prove every application can decode the file. If critical data is missing, restore from backup, request a new copy or use a reputable specialist with permission to access the content.
For important or sensitive files, retain a copy of the original and document each recovery attempt. Avoid tools that promise guaranteed reconstruction of missing bytes.
For a practical recovery order that minimizes accidental damage, see our safe file recovery checklist. For format-specific limits, see supported formats and test scope.
← All repair guides