Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Emoji don't always render: please prefer ASCII or limited Unicode. #14

Closed
pnathan opened this issue Apr 9, 2019 · 5 comments
Closed
Labels
enhancement New feature or request

Comments

@pnathan
Copy link

pnathan commented Apr 9, 2019




Describe the bug
What is the emoji? I just see boxes on my terminal.

To Reproduce

Steps to reproduce the behavior:
Run the tool on Konsole on Linux

Expected behavior
Colorized output or non-emoji textual output.

Screenshots
image

Versions (please complete the following information):

  • OS: Linux, Terminal is Konsole on KDE5
  • Popeye 0.1.4
  • K8s: 1.9.6 for this cluster

Additional context

This is both a cross-platform and an accessibility issue.

@pnathan
Copy link
Author

pnathan commented Apr 9, 2019

Note - I can submit a PR that looks like

image

but I suspect that an "emoji-on/-off" flag would be preferred, yes?

@derailed derailed added the enhancement New feature or request label Apr 9, 2019
@derailed
Copy link
Owner

derailed commented Apr 9, 2019

@pnathan Thank you for this report! I think scanning the user env vs flags might be a better approach to this. Thus tuning the sanitizer down based on the capabilities of the terminal.

@pnathan
Copy link
Author

pnathan commented Apr 9, 2019

@derailed spent a few minutes rummaging about. It looks like this is partially dependent on rendering engine (terminal emulator) and font, which is annoying. One trick suggested here is - https://stackoverflow.com/a/44445547 - I copypasted from my terminal to run it -

echo -n 🔊 | wc -m

but that simply returns one, just like echo -n w | wc -m does. So that seems to be a wash (-m returns number of characters: an emoji should be one character, regardless of byte length, just like, e.g., a kanji. So that seems to be a poor mechanism of assessing anyway).

It might be that switching on the environment variable TERM is the proper thing to do:

emacs-shell gives dumb and my Konsole terminal gives xterm-256color.

This is probably a minefield of "switch case", but plausibly it might work.

Contemplating, it might be that the proper thing to do would look a lot like ls --color

      --color[=WHEN]         colorize the output; WHEN can be 'always' (default
                               if omitted), 'auto', or 'never'; more info below

where auto tries to figure itself out, never, and always can be specified.

@derailed
Copy link
Owner

@pnathan Thank you so much for your investigation and report! I'll take a look at this on the next drop and see if we can figure out a way to compliment the various terminals in the report.

@derailed
Copy link
Owner

@pnathan I've added a flag in 0.2.0 -j or --jurassic based on some of your recommendations, hopefully that will help some... Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants