kathar0s255 downloadsDetects non-UTF-8 files (UTF-16 LE/BE, UTF-8 BOM, EUC-KR/CP949) on creation and rewrites them as clean UTF-8, preventing Korean/CJK text corruption in Obsidian. Includes a manual convert command.
An Obsidian plugin that automatically converts non-UTF-8 text files to clean UTF-8 the moment they are added to your vault — before Obsidian or a sync plugin can corrupt the content.
If you have ever dragged a .txt into Obsidian and seen your Korean/Japanese/Chinese text turn into garbage like ��� or 뿯붿, or seen Self-hosted LiveSync refuse a file with File seems to be corrupted! Writing prevented, this plugin fixes the root cause.
Obsidian reads and writes every note as UTF-8 and does not support other encodings. So when a text file uses a different encoding, the bytes are mis-decoded the instant Obsidian touches them:
.txt saved as "Unicode" from Windows Notepad) gets its multibyte characters destroyed — replaced with the Unicode replacement character � (U+FFFD).seems to be corrupted! Writing prevented (59286 != 100678), and the broken/blocked file propagates to your other devices.Once � has been written to disk, the original characters are gone forever — different source bytes all collapse to the same �, so there is nothing left to recover. The only real fix is to catch the file before that happens. That is exactly what this plugin does.
�, ?, or mojibake after import or syncFile seems to be corrupted! Writing prevented (X != Y) in Self-hosted LiveSyncrecordedSize vs storageSize).txt exported from transcription tools, call recorders, Notepad ("Unicode"/"Unicode big-endian"), or old Korean apps looks broken in Obsidiancreate event (a file being added/imported).vault.readBinary() — this avoids Obsidian's lossy UTF-8 text read, so the original bytes are still intact.euc-kr decoder, which includes the CP949/UHC extension) with a quality checkHandled text extensions: txt, md, markdown, csv, tsv, json, log, text, srt, vtt.
Settings → Community plugins → Browse → search "Encoding Auto-Fix" → Install → Enable.
kathar0s/obsidian-encoding-autofix.main.js and manifest.json from the latest release.<your-vault>/.obsidian/plugins/encoding-autofix/..obsidian/plugins/ is not always shared by sync, so install it on each device where you import files.� characters were already written to a file, the information is lost — re-import or fix the source file (e.g. re-export it as UTF-8) instead.I lost a meeting transcript to this exact bug: a UTF-16 .txt synced through Self-hosted LiveSync, got blocked with Writing prevented, and when force-received, every Korean character had become �. After confirming the original was fine and only Obsidian's UTF-8 assumption was the problem, I built this so that dragging a file in "just works" — and so others hitting the same wall don't lose their notes. If it helped you, an issue or star is appreciated. 🙏
Bug reports and PRs welcome at the GitHub repo. If a specific file isn't detected correctly, please attach the first ~32 bytes (hex) and the encoding you expected.
옵시디언에 추가되는 비-UTF-8 텍스트 파일을 자동으로 UTF-8로 변환하는 플러그인입니다. 옵시디언이나 동기화 플러그인(예: Self-hosted LiveSync)이 내용을 깨뜨리기 전에 가로채 고칩니다.
.txt를 옵시디언에 넣었더니 한글이 � 또는 뿯붿 같은 깨진 문자로 보임File seems to be corrupted! Writing prevented (59286 != 100678) 오류로 파일이 안 받아짐recordedSize ≠ storageSize)옵시디언은 모든 노트를 UTF-8로 가정하고, 다른 인코딩을 지원하지 않습니다. 그래서 UTF-16이나 EUC-KR/CP949 파일은 옵시디언이 읽는 순간 한글이 �(U+FFFD)로 손상됩니다. 한 번 �로 바뀌면 원래 글자는 영구 소실됩니다(서로 다른 바이트가 모두 같은 �로 뭉개지기 때문). 그래서 손상되기 전에 잡아야 하고, 이 플러그인이 그 역할을 합니다.
create 이벤트 감지readBinary()로 raw 바이트를 먼저 읽음 (옵시디언의 손실성 UTF-8 읽기 회피)현재 파일을 UTF-8로 변환.obsidian/plugins/는 동기화가 안 될 수 있음).�로 깨진 파일은 복구 불가 — 원본을 UTF-8로 다시 내보내 재추가하세요.