Fix garbled characters in imported files
Prompt that finds where text gets garbled on its way from file to database and sets one encoding rule. Paste it into an AI tool of your choice, which then fixes the garbled characters.
- Topic
- Apps & prototypes
- Type
- Prompt
- Level
- Intermediate
- Time
- about 15 min
Results depend on the tool, the model and what you enter.
Result preview
Example: written by our editors, not real AI output.
Example: "Müller" → "Müller" Cause: UTF-8 file read as Latin-1 in the import job | Step | Encoding | | CSV export | UTF-8 with BOM | | Import job | Latin-1 (wrong) | | Database | UTF-8 | Fix: read as UTF-8, strip BOM Test: Müller, Søren, José, €, ß
Fill in
What you type stays in this browser window. We store and send nothing.
- a CSV export from a spreadsheet
- a supplier price list
- an email or text file
- an XML or JSON feed
- data from an old system
- ü instead of ü
- question marks or boxes
- a strange character at the start
- only some rows are broken
- the export opens wrongly in a spreadsheet
- file upload into a web app
- nightly import job
- database to CSV export
- API to API
- copy and paste into a form
Your prompt
You have edited the prompt. Changes in the fields above no longer overwrite it.
This is an instruction for an AI, not the result itself.
Where this prompt works
These AI tools are a good fit for this prompt:
How to use it
- Fill in the fields or tap a suggestion. Leave out names, addresses and other personal data.
- Copy the finished prompt into an AI tool of your choice.
- Paste three to five broken strings next to the correct text; replace personal names with similar invented ones that contain the same characters.
Why does this work?
Garbled text looks chaotic, but each pattern points to one specific mix-up. Once the step is found, one setting usually fixes it.
Tips
- Repair stored data on a copy first and keep a backup of the original.