Skip to content

add option (-U, --no-unicode) to disable unicode at runtime#50

Merged
natoscott merged 1 commit intohtop-dev:masterfrom
eworm-de:unicode-runtime
Sep 2, 2020
Merged

add option (-U, --no-unicode) to disable unicode at runtime#50
natoscott merged 1 commit intohtop-dev:masterfrom
eworm-de:unicode-runtime

Conversation

@eworm-de
Copy link
Copy Markdown
Contributor

No description provided.

Comment thread CRT.c Outdated
Copy link
Copy Markdown
Member

@cgzones cgzones left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@Ckath
Copy link
Copy Markdown
Contributor

Ckath commented Aug 31, 2020

doesnt seem needed anymore after #54, which I think would be the preferable solution

@bertwesarg
Copy link
Copy Markdown
Contributor

doesnt seem needed anymore after #54, which I think would be the preferable solution

I think they match up perfectly. Disabling Unicode, even if the terminal is capable, looks like a valid case.

@eworm-de
Copy link
Copy Markdown
Contributor Author

Let me explain my use case: The graph meters use braille characters to display. This works fine if braille characters are available (X terminal), but fails if not: Only squares are displayed then. I use this to switch to ASCII mode in virtual (non-X) terminal. UTF-8 is supported there, just glyphs are missing.

Copy link
Copy Markdown
Member

@natoscott natoscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This needs a man page update I think...? Thanks.

@eworm-de
Copy link
Copy Markdown
Contributor Author

eworm-de commented Sep 1, 2020

Ah, right... Will add that.

@eworm-de eworm-de force-pushed the unicode-runtime branch 2 times, most recently from 6805e9d to 75950ed Compare September 1, 2020 07:18
@eworm-de
Copy link
Copy Markdown
Contributor Author

eworm-de commented Sep 1, 2020

Rebased and added the man page change.

@eworm-de eworm-de requested a review from natoscott September 1, 2020 07:20
Copy link
Copy Markdown
Member

@natoscott natoscott left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks - another small thing, it looks like all the #ifdef conditionals in htop.c could be removed around the new code? The default behaviour without HAVE_LIBNCURSESW is to not 'allowUnicode', right? - it seems that code can be simplified further, always allowing the -U/--no-unicode option to be entered by the user, no matter how htop is built.

@eworm-de
Copy link
Copy Markdown
Contributor Author

eworm-de commented Sep 1, 2020

Probably you are right. :)
Updated (and rebased) again.

@eworm-de eworm-de requested a review from natoscott September 1, 2020 08:11
@natoscott natoscott merged commit f79591e into htop-dev:master Sep 2, 2020
@eworm-de eworm-de deleted the unicode-runtime branch September 2, 2020 06:26
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

5 participants