How CotEditor Handles CJK Languages and File Encodings
Updated
CotEditor treats CJK (Chinese, Japanese, Korean) support as a first-class feature rather than an afterthought. According to the official site, it is "CJK Language Friendly," which specifically means it estimates various file encodings accurately, lets you toggle to vertical text mode, keeps line height correct in that mode, and can list characters that cannot be converted into a target encoding. If you regularly open text files of unknown origin or work with vertical Japanese or Chinese text, these are the capabilities that matter most.
Accurate encoding estimation
CJK text is where encoding problems surface fastest: the same byte sequence can be valid Shift_JIS, GB18030, or UTF-8, and guessing wrong produces mojibake. CotEditor's stated behavior is to "estimate various file encodings accurately," so when you open a file without specifying its encoding, the editor attempts to detect the right one instead of defaulting blindly to UTF-8.
What this means in practice:
- Opening legacy files — Japanese Shift_JIS or EUC-JP documents, and Chinese GB-family encodings, are more likely to display correctly on first open.
- Fewer manual corrections — you spend less time re-opening a file with a hand-picked encoding after seeing garbled text.
- A starting point, not a guarantee — estimation can still be wrong for short files or files with few CJK characters, since there is little data to distinguish encodings. If the text looks wrong, the fix is to reopen with an explicitly chosen encoding.
Vertical text mode and line height
CotEditor supports toggling to vertical text mode, and the site notes it keeps line height correct in that mode. This matters because vertical CJK layout is not just rotated horizontal text — line spacing, character advance, and punctuation positioning all change, and a naive rotation produces cramped or overlapping columns.
For anyone editing Japanese novels, traditional Chinese poetry, or any document intended for vertical reading, this means the editing view can match the intended output layout rather than forcing you to compose horizontally and convert later.
Checking characters that can't be converted
The "Incompatible Characters" feature checks and lists up characters in your document that cannot be converted into a desired encoding. This is the counterpart to encoding estimation: estimation is about reading a file in, and this feature is about writing a file out.
A concrete case: you have a UTF-8 document containing emoji, rare kanji, or symbols, and you need to save it as Shift_JIS for a legacy system. Rather than saving and discovering later that characters were replaced or dropped, you can have CotEditor list exactly which characters will not survive the conversion, then decide whether to substitute, remove, or keep the file in a wider encoding.
Related features that support CJK work
Several other documented features are useful in the same workflows:
| Feature | How it helps with CJK text |
|---|---|
| Syntax highlighting | 60+ pre-installed languages including HTML, PHP, Python, Ruby, Markdown; you can define your own |
| Outline menu | Extracts specified lines using the syntax definition and lets you jump to them — useful for navigating long structured documents |
| Split editor | Divides a window into panes to view different parts of the same document |
| Character inspector | Shows Unicode character data for each selected character in a popover — helpful when two visually similar characters behave differently |
| Scriptable macros | Write macros in Python, Ruby, Perl, PHP, UNIX shell, AppleScript, or JavaScript for batch text processing |
| Auto backup | Backs up documents automatically while editing, so unsaved work is not lost |
The character inspector is particularly relevant to CJK editing, since it lets you confirm exactly which Unicode code point a character is — the difference between a Chinese and Japanese variant of the same-looking character is often invisible on screen.
Practical conditions to keep in mind
- Platform: CotEditor is made specifically for macOS and behaves like a native macOS application. It is not available for Windows or Linux.
- Cost: the site states "It's free!" No pricing page or paid tier is indicated in the available material.
- Source: it is developed as an open-source project, with the project page on GitHub and an issue tracker for bug reports and feature requests.
- Launch speed: the site emphasizes rapid launch, so opening a file to check its encoding is a low-friction action.
If your work involves CJK text in mixed or unknown encodings, vertical layout, or conversion to narrower legacy encodings, CotEditor's documented feature set addresses each of those points directly. If you only ever handle UTF-8 files in horizontal layout, the encoding estimation and vertical mode will rarely come into play, and the more relevant features would be syntax highlighting, find and replace with the ICU regular expression engine, and the outline menu.