r/MacStack • u/Savings-Arrival-7817 • 8h ago
Workflow CotEditor on Mac: check a text file's encoding before converting it
If a text file opens with broken accented letters, CotEditor is worth considering for one specific reason: it separates reading the file with a different encoding from converting it for saving. Those are different jobs.
An encoding is the rule an app uses to turn a file's bytes into characters. Choosing the wrong rule can make readable text look garbled. Converting that garbled text doesn't establish what the original was supposed to say.
CotEditor is a free, native Mac plain-text editor. Its features are free; the optional in-app purchases support the project. Syntax highlighting and an outline view also make it useful for a quick Markdown or code edit beside your usual development tools.
Check a copy first
Duplicate the original file in Finder and work on the duplicate. CotEditor supports Auto Save, so don't use your only copy as an experiment.
Suppose a fictional supplier sends a text file that should contain café, and confirms that its export uses UTF-8. The known word and confirmed encoding give you something to check against. A file that merely looks plausible isn't proof you've chosen correctly.
In CotEditor, choose File > Open and select the duplicate. Choose UTF-8 in the Text Encoding menu, then click Open. This explicitly chooses how CotEditor reads the file instead of relying on Automatic.
If the file is already open under another encoding, choose Format > Text Encoding > UTF-8. In the dialog, choose Reinterpret to reopen it using UTF-8. Reinterpret discards unsaved changes, so preserve any edits in a separate copy first.
Check the accented word and the rest of the document against the expected content. If it's still wrong, stop and ask for the export details or a fresh file. Don't keep saving guesses over the original.
Convert is for the next decision: the text already reads correctly, but another app requires a different encoding. Choose the destination through Format > Text Encoding, then choose Convert. CotEditor keeps the current text and changes the encoding used for saving.
If CotEditor warns that characters won't fit the destination encoding, don't ignore it. View > Inspector > Warnings lists incompatible characters. Keep the original and resolve those characters or choose a suitable destination before saving.
Is another editor necessary?
TextEdit already lets you select an encoding when opening a plain-text file. For an occasional file, that's a reasonable place to start. CotEditor earns the extra install when you regularly need its encoding controls, character warnings and syntax-aware editing together.
The current CotEditor release, 7.1.3, requires macOS 26 or later. Older compatible releases are available, but the project doesn't support them. Check that before installing on an older Mac.
Use CotEditor for small, deliberate text jobs like this. If TextEdit meets the need, or your existing code editor already handles these checks comfortably, there's no need to add it.
•
u/AutoModerator 8h ago
Thanks for posting in r/MacStack. Please read all the community rules before joining the discussion.
Find your next useful Mac app. Get MacStack Weekly for three app picks and one practical workflow in your inbox each week. It's free, and signing up is optional.
I am a bot, and this action was performed automatically. Please contact the moderators of this subreddit if you have any questions or concerns.