junegunn / fzf

:cherry_blossom: A command-line fuzzy finder
https://junegunn.github.io/fzf/
MIT License
64.73k stars 2.38k forks source link

doesn't display properly on Linux console #2050

Closed polijan closed 4 years ago

polijan commented 4 years ago

Info

Problem / Steps to reproduce

Fzf recently started to use a wider range of Unicode characters for its user interface (rounded corner preview, braille spinner indicator, others?). Those new characters may look great on a modern desktop, but may not display as intended on other systems (servers, embedded, etc...).

As an example, the Linux console supports Unicode but only a maximum of 256 (or 512 with less colors) glyphs. Default glyphs (symbols from CP437) and virtually every console fonts have printable ASCII and simple-line drawing, but not rounded corners or braille.

Even in a desktop environment, traditional bitmap fonts or some modern minimal fonts may also not include those.

Suggestions

  1. existing --border(=sharp) could control border around the preview also (not just around the finder)
  2. --spinner=... option, with possible values (braille [default], ascii, ...)
junegunn commented 4 years ago

--no-unicode is what you're looking for.

polijan commented 4 years ago

Hi, thanks @junegunn for the answer. I still wouldn't mark the issue as closed though!

Because dropping to ASCII is a regression being brought by version 0.21. Fzf 0.20 and earlier versions worked well on the Linux console including all the line drawing! (as I explained, Linux console has some Unicode support)

antofthy commented 4 years ago

FYI...

I looked at a unicode demo file on my linux console Only around half the standard unicode glyphs were defined, and none of the various unicode Spinners that I have collected works.

In summery looks like your only real choice is to use --no-unicode as previously suggested.

mb720 commented 1 year ago

I had the same issue. Running

localectl set-locale en_US.UTF-8

fixed it in my case.

See other answers here.