Red Hat Bugzilla – Bug 163594
broken codepage recoding in editor/view with Ctrl+T
Last modified: 2013-07-02 19:08:27 EDT
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.8) Gecko/20050513 Fedora/1.7.8-1.3.1
Description of problem:
I'm use LANG=ru_RU.koi8r and everything is fine with current version of mc in FC3 (russian menus, input/output, etc)
BUT: just one thing is broken: when I press <Ctrl>+<T> in built-in viewer or editor it shows me small menu to choose encoding of file:
- <without enc>
0 7-bit ASCII
1 ISO 8859-1
2 ISO 8859-2
Then I choose encoding and nothing happen! I.E. text is not changing!
Version-Release number of selected component (if applicable):
Steps to Reproduce:
2.Menu->Options->Display bits->KOI8-R (and full 8-bit input checked)
3.Open any plain text file with viewer and press <Ctrl>+<T>, choose different encoding
Actual Results: Nothing happen
Expected Results: Changing encoding of showed file. I.e. if it was readable - it will not.
(esp. KOI8-R and Windows-1251 - u'll easily see changing CASE of letters)
I've put 2 pics of this (nekrasov-koi8 is right encoding and nekrasov-cp1251 is wrong encoding on same file)
MC which is included in ASPLinux (http://download.asplinux.ru/i386/updates/10/i386/mc-4.6.1-0.14.0.100asp.i386.rpm) is working fine. But I do not like to rebuild it every time when FC build of MC is changing.
Created attachment 116919 [details]
Test file with small classic poem
This is a small plain text file with russian text in KOI8-R encoding
Created attachment 116920 [details]
Picture of how it shown with wrong or right encoding
This is a snapshot of my window with mc when view this file. When I change
encoding with <Ctrl>+<T>, nothing happen
Created attachment 116922 [details]
Picture of how it SHOULD BE with wrong KOI8->CP1251 encoding
with MC from ASPLinux, I can choose encoding of a file and it changing in my
Thanks for the nice bugreport. Could you please check whether you can reproduce
the same thing with the latest development mc version?
This version is downloadable at:
If this is fixed there, I'll release a FC3 update to fix it.
# rpm -Uhv http://people.redhat.com/jnovy/files/mc-4.6.1a-0.11.i386.rpm
and everything is fine!!!
Ok, thanks again for a very good bugreport.
so, I have mc-4.6.1a-0.11
Bug with 'recoding' in viewer fixed. BUT:
Today I've found the SAME problem with MC built-in text editor (mcedit)
Could you please fix this too?
version mc-4.6.1a-0.12, builded from src.rpm, have same bug too
Created attachment 118107 [details]
Patch to fix your problem.
This patch seems to fix your case by addition of "Current charmap". Please try
to apply this patch to mc-4.6.1a-0.12 (applies smoothly) and let me know
whether it fixes the problem for you.
does not help at all
"current codepage" and "koi8-r" both.
Firstly, I should like to note the patch #118107 is not fixed mcedit code. It
affects on viewer only.
And next, I found viewer problem at mc-4.6.1-1.FC3 release. Please, Jindrich,
consider the attached patch. (I think this issue comes with new code in
Hello Andy, can you attach the patch here so that I can review it? Thanks.
Created attachment 118306 [details]
Patch for fixing described issue
Andy, thanks for the patch, it's now applied.