DEV Community

Cover image for Cross-platform terminal characters
ehmicky
ehmicky

Posted on

2 1

Cross-platform terminal characters

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)

Speedy emails, satisfied customers

Postmark Image

Are delayed transactional emails costing you user satisfaction? Postmark delivers your emails almost instantly, keeping your customers happy and connected.

Sign up

Top comments (0)

A Workflow Copilot. Tailored to You.

Pieces.app image

Our desktop app, with its intelligent copilot, streamlines coding by generating snippets, extracting code from screenshots, and accelerating problem-solving.

Read the docs

👋 Kindness is contagious

Please leave a ❤️ or a friendly comment on this post if you found it helpful!

Okay