Moth

Text encodings

Choose another text encoding when a program needs it.

Choose an encoding

Most sessions should use UTF-8, which is the default. For a program that needs another encoding, choose it in Settings → Shell → Text encoding or Window → Text Encoding. You can limit the list of choices in Settings → Advanced, or with enabledEncodings in the file.

Choose the same encoding as the program you’re connecting to. Moth doesn’t change its locale automatically. Hiding an encoding from the list won’t change a session that already uses it; that choice stays marked as current. At least one encoding must remain enabled.

Available encoding identifiers

Moth offers the following encodings when your Mac supports them:

TOML identifier Encoding
UTF-8 Unicode UTF-8
ASCII ASCII
ISO-8859-1 Western ISO 8859-1
ISO-8859-15 Western ISO 8859-15
WINDOWS-1252 Western Windows 1252
MACINTOSH Mac OS Roman
ISO-8859-2 Central European ISO 8859-2
WINDOWS-1250 Central European Windows 1250
ISO-8859-7 Greek ISO 8859-7
ISO-8859-9 Turkish ISO 8859-9
KOI8-R Cyrillic KOI8-R
WINDOWS-1251 Cyrillic Windows 1251
SHIFT_JIS Windows-compatible Shift JIS
EUC-JP Japanese EUC-JP
GB18030 Simplified Chinese GB18030
BIG5 Traditional Chinese Big5
EUC-KR Korean EUC-KR

Conversion behaviour

The selected encoding applies to terminal output and to text you type, paste or send through a macro. Moth keeps incomplete multibyte characters between reads so they can be decoded when the rest arrives. Invalid output gets a replacement character. If an input character can’t be represented, Moth beeps and explains the problem instead of silently changing it.

Terminal replies and raw mouse events bypass this conversion. The emulation core receives UTF-8 internally. Legacy conversion uses the Mac’s iconv implementation, with Core Foundation mappings for GB18030.