Bug 464708 - midnight commander: minor bugs in utf-8 patches
midnight commander: minor bugs in utf-8 patches
Status: CLOSED NEXTRELEASE
Product: Fedora
Classification: Fedora
Component: mc (Show other bugs)
10
All Linux
medium Severity medium
: ---
: ---
Assigned To: Jindrich Novy
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-09-29 19:39 EDT by Rafał Mużyło
Modified: 2013-07-02 19:32 EDT (History)
4 users (show)

See Also:
Fixed In Version: 4.6.2-4.fc9
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-06-02 10:16:25 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
diff between your patch and the one I'm using (1.57 KB, patch)
2008-12-02 17:21 EST, Rafał Mużyło
no flags Details | Diff
the full diff (2.36 KB, patch)
2008-12-03 11:07 EST, Rafał Mużyło
no flags Details | Diff

  None (edit)
Description Rafał Mużyło 2008-09-29 19:39:22 EDT
I hope this bug won't get closed due to some minor technical detail, cause it's fully valid.

First of all, I'm a gentoo user.
Gentoo uses Debian patches, but they didn't really work for me,
so I decided to give yours a try.
They work in most cases, but there are still minor problems.

There are 4 problems I can recall, first three are double-width char related,
fourth - I'm not sure.

1. in the viewer: tested on kana/kanji, but probably valid for all double width;
Text is not displayed correctly, hard to explain, you'd have to see it for yourself. The fix was actually in your patches at some point, but then it disappeared. It was the following block:
 {
  int cw = wcwidth(wc);
  if (cw > 1)
    col+= cw - 1;
 }
in src/view.c
2. when a double-width char is entered in one of the standard input boxes,
a dot is added beyond the end of input, the dot is removed, if the char is removed
3. when a double-width char is entered in one of the password input boxes,
two stars appear instead of one

I found a fix that works for me for both of this cases, though I'm not sure if it's fully correct

Check my comments in Gentoo bug 237195.

4. this is one hard to noticed and I'm not sure whether it's double-width related or is a problem of utf8 string length in bytes vs the same in chars;
when the path shown over panels is very long it get truncated (that the expected behavior), but I've seen it getting truncated in the middle of utf8 char, meaning instead of the chars, hex sequences in brackets are printed;
I'm not sure if this can only be observed with double-width chars
(maybe it's some bizarre mix of bytes/string char count/string width)

The patches I use came from an rpm with last changelog entry in spec file:
Tue Sep  2 2008 Jindrich Novy <jnovy@redhat.com> 4.6.2-6.pre1
Comment 1 Bug Zapper 2008-11-25 22:16:42 EST
This bug appears to have been reported against 'rawhide' during the Fedora 10 development cycle.
Changing version to '10'.

More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping
Comment 2 Rafał Mużyło 2008-12-02 17:21:08 EST
Created attachment 325437 [details]
diff between your patch and the one I'm using

This is the diff between your base utf8 patch
and the one with all 3 mentioned changes.

BTW, it seems that mc is almost as dead here,
as it's in Gentoo. Hopefully, not as dead as it 
is upstream.
Comment 3 Jindrich Novy 2008-12-03 09:08:33 EST
Hi Rafał,

thanks for the patch. I see it is truncated? At least the last hunk is malformed. Please readd the correct one and I will happily apply it as soon as I test it.
Comment 4 Rafał Mużyło 2008-12-03 11:07:50 EST
Created attachment 325551 [details]
the full diff

Well, that's cause it's edited a bit.

This is the full diff.
The previous one had the last block partially removed,
as it's not relevant to this problem (and I can't really
tell anymore, why does it exist in the first place
- maybe I accidentally combined two of your patches ?).

My hacks are those 2 one line changes, the 4 line block
comes from some older patch.
Comment 5 Jindrich Novy 2008-12-04 09:17:49 EST
Ok, it is unapplicable anyway ;) But it was enough to understand your changes. I modified your implementation to match mc coding style and simplified it a bit. It is now applied, thanks for the patch!
Comment 6 Rafał Mużyło 2008-12-08 21:43:48 EST
There's still problem 4.
Did you have a chance to fix it ?
Comment 7 Fedora Update System 2009-06-01 06:55:56 EDT
mc-4.6.2-4.fc9 has been submitted as an update for Fedora 9.
http://admin.fedoraproject.org/updates/mc-4.6.2-4.fc9
Comment 8 Fedora Update System 2009-06-02 10:15:57 EDT
mc-4.6.2-4.fc9 has been pushed to the Fedora 9 stable repository.  If problems still persist, please make note of it in this bug report.

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