UTF-8 and Garbled Text, Explained
A file that looked fine on one computer opens on another as "નમસà«àª¤à«" instead of "નમસ્તે", or "₹500" instead of "₹500". Nothing is wrong with your text — the program reading it is using the wrong character encoding.
This guide explains character encodings in simple terms and shows how to fix and avoid garbled text.
Characters, bytes and encodings
Computers store text as bytes. An encoding is the rulebook that says which bytes mean which characters. Old encodings such as Windows-1252 could represent only a few hundred characters — enough for English and Western European languages, but not for Gujarati, Hindi or the ₹ sign.
Unicode assigns a number to every character in every script, and UTF-8 is the most common way to store those numbers as bytes. English letters take one byte, while characters such as ₹ or ગ take three bytes.
Why text becomes garbled
Garbled text (sometimes called mojibake) appears when UTF-8 bytes are read with an old encoding. Each three-byte Gujarati character is shown as three separate wrong symbols, which is why "નમસ્તે" becomes a long string of à and ª.
The text is usually still intact in the file. Reopening it with UTF-8 shows it correctly — but if you save it while it looks garbled, the damage becomes permanent.
The BOM: a small marker that helps
A byte-order mark (BOM) is an invisible marker at the very start of a file that says "this file is UTF-8". Most modern software does not need it, but Microsoft Excel does: a CSV with a BOM opens correctly when double-clicked, while one without it often appears garbled.
That is why FilesSwift JSON to CSV adds a BOM to its output, and why the CSV converters read files as UTF-8 first.
How to fix garbled text
Depending on where you see it:
- CSV in Excel: open it with Data → From Text/CSV and choose "65001: Unicode (UTF-8)" as the file origin.
- Text files: open in a modern editor (VS Code, Notepad on Windows 10/11) and re-open or save as UTF-8.
- Text you are creating: always save as UTF-8 — in Notepad, choose Save As → Encoding: UTF-8.
- Web pages and emails: make sure the page or message declares charset=UTF-8.
Encoding is not the same as Base64 or URL encoding
Base64 and URL (percent) encoding are different things: they turn bytes into safe ASCII characters for transport. Both work on the UTF-8 bytes of your text, which is why "₹" becomes %E2%82%B9 in a URL — the three UTF-8 bytes of the rupee sign.
Frequently asked questions
Is UTF-8 the same as Unicode?
Unicode is the list of characters; UTF-8 is a way of storing them as bytes. In practice, "save as UTF-8" is what you want.
Should every file have a BOM?
No. Most systems prefer UTF-8 without a BOM. It mainly helps Excel open CSV files correctly.
Why does ₹ become ₹?
The three UTF-8 bytes of ₹ were read using the Windows-1252 encoding, which shows each byte as a separate character.
Can garbled text always be repaired?
If the original bytes are intact, yes — reopen the file as UTF-8. If it was saved again while garbled, some characters may be lost.