I would like to use special mark symbols not only in window-system but also in xterm:

(setq gnus-summary-to-prefix (if window-system "▒ " "==> "))

What check I should use?

1 Answer 1


It's probably not just about whether Unicode is available but also whether a given font supports a particular Unicode character.

I'm not sure that it helps for non-graphic (i.e., console/terminal) Emacs, but for a graphic display you can use char-displayable-p:

char-displayable-p is an autoloaded Lisp function in `mule-util.el'.

(char-displayable-p CHAR)

Return non-nil if we should be able to display CHAR.
On a multi-font display, the test is only whether there is an
appropriate font from the selected frame's fontset to display
CHAR's charset in general.  Since fonts may be specified on a
per-character basis, this may not be accurate.
  • 1
    emacs.stackexchange.com/questions/7249/… say that char-displayable-p is no working on terminal.
    – gavenkoa
    Feb 10, 2016 at 15:34
  • 2
    Yeah, that's what I was afraid of ("I''m not sure that it helps for non-graphic"). Too bad the doc string doesn't say anything about that... Maybe someone else has a better answer. If not, maybe consider filing an Emacs bug (M-x report-emacs-bug) to ask for it (assuming it is possible), or to at least ask that it be clearly documented.
    – Drew
    Feb 10, 2016 at 15:42
  • 1
    Actually it may be good enough to test whether the terminal supports Unicode, if your configuration ensures that you always use fonts (or fontsets) containing your favorite characters. To me the real underlying issue is making the display be different on different terminals. Mar 11, 2016 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.