When using Midnight Commander with the default settings of PuTTY connected to my Ubuntu Linux machine the line drawing characters are all messed up.

After some experimentation it turns out that to fix it all you have to do is change your character set in PuTTY to UTF-8 and the problem is fixed. To do this open up the PuTTY settings and go to Window->Translation->Received data assumed to be in which character set: and change it to UTF-8.

After making this change you might have to force a redraw of the mc screen to show the new line drawing characters:

Also not that some fonts might not have the line drawing characters available. The fonts I know work is Courier New and Lucida Console. To change your font go to Window->Appearance, Font settings and click the Change button.
For reference, I was using using Midnight Commander 4.6.1 running on Ubuntu 7.10 and using PuTTY 0.59
Comments
Great it works
thank you for sharing your finding.
Perfect, that worked
I was trying to figure this out but it would've taken days. Your fixed worked perfectly with my Ubuntu 8.04 Virtual Appliance, thanks.
Have you guys seen MC for Windows?
http://homepages.compuserve.de/SiegwardJaekel/mc-gb.htm
Awesome.
Dan
www.DVDs4theSAT.com
SAT tutoring you can rewind
Thanks it works
thanks a lot it works!
had same problem when connecting to the most of newest *nix.
Worked Fine on Fedora
I am running MC on Fedora and displaying on WinXP.
Setting UTF-8 worked perfectly.
Thanks
thanx
thanx
Alternative Fix for Arch Linux
Oddly enough, the above fix doesn't work for me on Arch Linux. Since the fix that did work is almost diametrically opposite, it might be an alternative starting point for others:
In putty:
1. Set font to Consolas under Appearance.
2. Set encoding to ISO-8859-1 under Translation. This is weird: Arch Linux is a full UTF-8 distro, and my locale is set to en_US.UTF-8. No idea why it works; maybe mc does not really support UTF-8.
3. Set "Use font in both ANSI and OEM modes" under Translation. This seems to ferret out the line drawing glyphs which appear to be otherwise unavailable.
4. Set terminal-type string to "putty-256color" under Data. Not sure this is needed, but its the most specific terminal type available for putty under Arch Linux, and we might just as well use it.
I might get bitten by the 2nd setting later on, but atm I don't really need anything beyond normal ascii characters.
Update
I rechecked the Arch Linux package repositoty, and found an alternative mc-utf8 package that I had missed at first. This one does behave like it should: Lucida Console + UTF-8 encoding + Unicode linedrawing codes = proper lines. However, I lose my preferred Consolas font, which is annoying since it does seem to have the necessary glyphs, just not accessible in Unicode mode.
Thanks for the alternative
Thanks for the alternative solution for Arch Linux Yavuz!
Post new comment