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

From 4.8.18 strange behavior when used in a SSH session from PuTTy #3820

Open
mc-butler opened this issue May 2, 2017 · 20 comments
Open

From 4.8.18 strange behavior when used in a SSH session from PuTTy #3820

mc-butler opened this issue May 2, 2017 · 20 comments
Labels
area: tty Interaction with the terminal, screen libraries prio: medium Has the potential to affect progress

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/3820
Reporter knudch (knud.skrald@….info)
Mentions egmont (@egmontkob), kloczek (kloczko.tomasz@….com), dickey (dickey@….com)

In a SSH session coming from PuTTy codepage is incorrect eg. line drawings etc is wrong.
Should be UTF-8 but is ISO8859-1.
SSH session from a Linux client MC 4.8.18 is working correct.

Version 4.8.17 does not show this bug
4.8.18/19 do..

Knud

Note

Original attachments:

  • mc_bug1.png (raw) by knudch (knud.skrald@….info) on May 2, 2017 at 14:59 UTC
@mc-butler
Copy link
Author

Changed by knudch (knud.skrald@….info) on May 2, 2017 at 10:54 UTC (comment 1)

Tried another SSH client from windows..SmartTTy
same behavior....MC is using wrong codepage

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 2, 2017 at 11:09 UTC (comment 2)

Do you use vanilla mc or mc from some repo (probably, with some patches)?

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on May 2, 2017 at 11:10 UTC (comment 3)

Related to #3809.

@mc-butler
Copy link
Author

Changed by knudch (knud.skrald@….info) on May 2, 2017 at 12:13 UTC (comment 2.4)

Replying to andrew_b:

Do you use vanilla mc or mc from some repo (probably, with some patches)?

Fedora F25 and F26 std repo

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 2, 2017 at 13:09 UTC (comment 5)

  • Cc set to egmont

Fedora just recently switched from slang to ncurses.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 2, 2017 at 13:12 UTC (comment 6)

Could you please attach a screenshot?

eg. line drawings etc is wrong.

Is this only the line drawing wrong, or something else too? If so, what?

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 2, 2017 at 13:23 UTC (comment 7)

PuTTY is known not to support the linedrawing "alternate character set" in UTF-8. To workaround in ncurses, try this:

export NCURSES_NO_UTF8_ACS=1

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 2, 2017 at 13:35 UTC (comment 8)

As per http://www.cl.cam.ac.uk/~mgk25/unicode.html#term probably PuTTY does The Right Thing, although it's not the best choice wrt. backwards compatibility.

ncurses could safely go for UTF-8 for single line drawing chars, yet it chooses the backwards compatible braindamaged way instead which doesn't work in PuTTY. It also fails to handle double line drawing chars: #3158. Not my favorite piece of software, to say the least :(

I'm wondering if mc could work around this issue by setting NCURSES_NO_UTF8_ACS=1 for itself, although the problem is not limited to mc, effects all other ncurses apps the same way, so it should rather be solved on ncurses or OS/distribution level.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 2, 2017 at 14:41 UTC (comment 9)

  • Cc changed from egmont to egmont, kloczek

@kloczek: FYI, another consequence of your slang -> ncurses migration.

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 2, 2017 at 14:43 UTC (comment 10)

@egmont, maybe try to involve @Dickey in the discussion?

@mc-butler
Copy link
Author

Changed by knudch (knud.skrald@….info) on May 2, 2017 at 14:59 UTC

@mc-butler
Copy link
Author

Changed by knudch (knud.skrald@….info) on May 2, 2017 at 15:00 UTC (comment 6.11)

Replying to egmont:

Could you please attach a screenshot?

eg. line drawings etc is wrong.

Is this only the line drawing wrong, or something else too? If so, what?

I have not found anything else than the line drawings

Screenshot attached with Putty setting codepage UTF-8

@mc-butler
Copy link
Author

Changed by knudch (knud.skrald@….info) on May 2, 2017 at 15:06 UTC (comment 7.12)

Replying to egmont:

PuTTY is known not to support the linedrawing "alternate character set" in UTF-8. To workaround in ncurses, try this:

export NCURSES_NO_UTF8_ACS=1

Then line drawing is ok

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on May 2, 2017 at 19:35 UTC (comment 13)

  • Cc changed from egmont, kloczek to egmont, kloczek, dickey

Hi Thomas,

I'm CC'ing you on this issue since you might have an opinion on that. In not, please feel free to remove yourself :-) Is there a function we can call to the same effect as setting NCURSES_NO_UTF8_ACS, and should we do this, or rather it should be done differently / at a different level?

Z.

@mc-butler
Copy link
Author

Changed by dickey (dickey@….com) on May 3, 2017 at 0:18 UTC (comment 14)

There's no function (intentionally: ncurses uses environment variables where a function would not be helpful). You'd have to set the environment variable before initializing a screen, e.g., with newterm or initscr.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on May 3, 2017 at 21:03 UTC (comment 15)

Just for the record: http://www.chiark.greenend.org.uk/~sgtatham/putty/wishlist/utf8-plus-vt100.html .

It's been a "wish" for PuTTY for 10+ years now with "priority: low: We aren't sure whether to fix this or not."

@mc-butler
Copy link
Author

Changed by knudch (knud.skrald@….info) on May 4, 2017 at 5:22 UTC (comment 16)

As I can read....the "wish" for PuTTy has some "implications"....right or wrong I don't know.

But PuTTY is not alone to this problem....As mentioned earlier in this thread other combinations (SmartTTy/MC) shows the same behavior.

@mc-butler
Copy link
Author

Changed by lzsiga (@lzsiga) on Jul 25, 2017 at 14:10 UTC (comment 17)

environment variable LC_CTYPE and Putty's Configuration/Window/Translation/Remote_character_set should be compatible: both UTF-8 or both ISO-8859-x

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Jul 25, 2017 at 14:26 UTC (comment 18)

  • Milestone changed from 4.8.20 to Future Releases
  • Component changed from mc-core to mc-tty

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Jun 29, 2019 at 10:08 UTC (comment 19)

PuTTY version 0.71 adds a new config option:

"Enable VT100 line drawing even in UTF-8 mode"

Enabling it should also solve the "lqqqqqqqq" problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: tty Interaction with the terminal, screen libraries prio: medium Has the potential to affect progress
Development

No branches or pull requests

1 participant