While ASCII characters display correctly on all terminals, this is not the case of all characters. When building a terminal application or tool, it is common to experience cross-platform issues like:
The main reasons are:
- The terminal font might not include this specific character.
- The terminal encoding may not support Unicode. For example,
cmd.exe
on Windows often use specific encodings like CP437, CP850 or Windows-1252. - The application might not be properly converting encodings when reading or writing terminal characters.
The first two points can be solved by using characters known to display correctly on most terminals and environments.
The following repository shows a full list of cross-platform terminal characters: https://github.com/ehmicky/cross-platform-terminal-characters
Those have been tested on:
- Ubuntu 20.10, Gnome terminal 3.38.0
- macOS 10.14, terminal.app 2.9
- Windows 10.0.17763, cmd.exe (CP850)
Top comments (0)