Bug 426756 - Midnight Commander does not view correctly files with 8-bit characters except in UTF-8 locale
Midnight Commander does not view correctly files with 8-bit characters except...
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
: 188079 (view as bug list)
Depends On:
  Show dependency treegraph
Reported: 2007-12-25 16:47 EST by Andrew Zabolotny
Modified: 2013-07-02 19:25 EDT (History)
3 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-03-27 09:34:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
A simple patch that fixes the bug (not mine) (768 bytes, patch)
2007-12-25 16:47 EST, Andrew Zabolotny
no flags Details | Diff

  None (edit)
Description Andrew Zabolotny 2007-12-25 16:47:04 EST
Description of problem:
Midnight Commander does not display correctly 8-bit characters in viewer (F3) if
using any 8-bit locale except UTF-8.

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Set locale to any non-UTF8 8-bit locale and switch gnome-terminal to that
locale (e.g: export LANG=ru_RU.KOI8-R and switch gnome-terminal to KOI8-R).
2. View (F3) any file containing 8-bit characters, you should see cyrillic
letters instead of most codes with code >= 128.
Actual results:
It displays latin characters (codes < 128) instead of characters with high bit
set. Looks like if the high bit would be somewhere lost.

Expected results:
8-bit characters should be displayed as is.

Additional info:
Half of year ago I found someone's patch that fixes the problem. Unfortunately I
can't remember where I found it since I haven't intended to submit it anywhere,
just that I kept recompiling mc with every update, but now I see that it takes
too long to wait till this bug hits the trunk. The patch is attached.
Comment 1 Andrew Zabolotny 2007-12-25 16:47:04 EST
Created attachment 290385 [details]
A simple patch that fixes the bug (not mine)
Comment 2 Jindrich Novy 2008-03-27 09:34:41 EDT
Applied, thanks!
Comment 3 Leszek Matok 2008-07-05 02:05:52 EDT
Jindrich and Andrew, this patch is taken straight from bug #188079 (patch
#128659). The original author is Dmitry Butskoy (and he should take credit in
the changelog).

Jindrich, somehow you let us wait 2 years for the apply and all that was needed
was to open a new bug for you to see. I'll try to use that tactics for my other
bugs, thanks for a tip.
Comment 4 Dmitry Butskoy 2008-07-07 08:23:02 EDT
*** Bug 188079 has been marked as a duplicate of this bug. ***
Comment 5 Slava Zanko 2009-05-25 18:09:14 EDT

With UTF-8 support in mc now correct work with one-byte charsets.
Now possible to edit/view UTF-8 files with 8-bit system charset and possible to edit/view 8-bit files with UTF-8 system charset.

Also, possible to recode filenames/dirnames in left/right panel (and recode names on-fly while copy/move, of course)

Note You need to log in before you can comment on or make changes to this bug.