Guides
Fixing GBK, Big5, Shift-JIS & EUC-KR Garbled Text Locally
Diagnose and repair garbled Chinese, Japanese, and Korean text files (GBK, GB18030, Big5, Shift-JIS, EUC-KR) to clean UTF-8 without uploading.
Quick Answer: Legacy enterprise exports, subtitles, and East Asian CSVs frequently use `GBK`, `GB18030`, `Big5`, `Shift-JIS`, or `EUC-KR` instead of UTF-8. Running strict UTF-8 validation followed by byte-frequency detection in your browser decodes raw `Uint8Array` streams accurately to clean UTF-8 without sending sensitive files to external servers.
Why CJK text turns into or Õ½ÚÒ»
Legacy regional encodings represent East Asian characters using 2-byte sequences outside ASCII. Simplified Chinese files from older Windows apps often use GBK or GB18030, Traditional Chinese uses Big5, Japanese exports use Shift-JIS, and legacy Korean systems use EUC-KR.
When a UTF-8 reader decodes those raw bytes as Latin-1 or inserts replacement glyphs (`�`), text becomes unreadable—yet the original byte stream still holds the exact characters.
- GBK / GB18030: Simplified Chinese legacy Windows code page 936.
- Big5: Traditional Chinese code page 950 common in Taiwan & Hong Kong archives.
- Shift-JIS: Japanese code page 932 common in CSVs, games, and lyrics.
- EUC-KR: Korean code page 949 / KS X 1001 legacy files.
How strict byte detection avoids double-corruption
Never save a file after opening it garbled in Notepad—doing so permanently overwrites the original bytes with `�` replacement characters. Always decode the unmodified original file bytes.
TxtTo checks strict `TextDecoder("utf-8", { fatal: true })` first, inspects BOM headers, runs statistical `chardet` detection, and lets you override the source code page cleanly.
const decoder = new TextDecoder("gb18030");
const cleanText = decoder.decode(originalFileBytes);
const utf8Bytes = new TextEncoder().encode(cleanText);Repairing CJK subtitles (.srt / .lrc) and batch folders
Fansubs and karaoke lyric files frequently ship in GBK or Shift-JIS, rendering unreadable boxes in modern media players and web HTML5 players.
Drop an entire batch of `.txt`, `.csv`, `.srt`, `.lrc`, or `.log` files into TxtTo to convert them all to UTF-8 simultaneously and download a single clean ZIP archive.
Standardizing line endings after encoding conversion
Legacy Windows code-page exports also carry CRLF (`\r\n`) line endings. If you are moving converted scripts or CSV configs into macOS/Linux Git repos, follow up with CRLF to LF normalization.
References
Frequently asked questions
What is the difference between GBK and GB18030?
GB18030 is the modern superset of GBK and GB2312. Using GB18030 as the decoder safely decodes virtually all Simplified Chinese legacy files including rare characters.
Can TxtTo recover text after someone saved replacement diamond glyphs?
If a file was already overwritten with literal U+FFFD characters, the original byte values were lost. Always run conversion on the unmodified source file.
Does WHATWG TextDecoder support Big5, Shift-JIS, and EUC-KR offline?
Yes. Modern browsers implement the WHATWG Encoding Standard natively inside TextDecoder, requiring zero external translation tables or server calls.
Related formats
Related Comparisons
Related Guides
- Why Excel Garbles UTF-8 CSVs — and How UTF-8 BOM Fixes ItStop Microsoft Excel from turning Chinese, Japanese, Korean, Spanish, and German CSV text into mojibake by adding a 3-byte UTF-8 BOM locally.
- SRT vs WebVTT vs ASS: Subtitle Conversion & Sync GuideLearn the exact timestamp rules for SRT, WebVTT, and ASS/SSA subtitles—convert formats, clean rolling captions, and fix audio sync locally.
- Merging & Splitting Large CSV Files Locally Without Crashing ExcelCombine multi-file CSV exports by column header name or split oversized sheets into clean chunks with repeated headers and ZIP export locally.