Ticket #2 (closed defect: fixed)
savannah: UTF-8 locales not supported
Reported by: | slavazanko | Owned by: | slavazanko |
---|---|---|---|
Priority: | major | Milestone: | 4.7 |
Component: | mc-core | Version: | |
Keywords: | Cc: | ||
Blocked By: | Blocking: | ||
Branch state: | merged | Votes for changeset: |
Description (last modified by ossi) (diff)
Original: http://savannah.gnu.org/bugs/?7936
Submitted by: | None | Submitted on: | Sat 28 Feb 2004 08:34:30 PM UTC |
Category: | Screen output | Severity: | 3 - Normal |
Status: | None Privacy: | Public | |
Assigned to: | None | Open/Closed: | Open |
Release: | 4.6.0 | Operating System: | GNU/Linux |
Original submission:
I use a locale with UTF-8 character encoding, which is supported by the terminal I use (gnome-terminal). When I run mc on that configuration, the display appears distorted. It seems that it's because my non-ASCII file names have less characters than strlen() returns (there are several octets for some characters), and thus the frames don't get positioned in their appropriate columns.
Comment 1 by Egmont Koblinger <egmont> at Tue 30 Nov 2004 09:30:53 AM UTC:
Take the patches from Fedora Core or SUSE. First for slang, and later for mc. Also convert the help and hint files to UTF-8. You'll have quite good (but not 100% bugless) UTF-8 support. Not only for filenames, but also for the viewer, editor... AFAIK these patches will be fed back to mainstream mc for the 4.7.x series.
Comment 2 by Itzchak Rehberg <izzysoft> at Wed 21 Sep 2005 10:14:43 AM UTC:
I saw the UTF-8 problem addressed for the 4.7 branch, which probably is not to be expected in the really "near future". Since for multi-language requirements (German, English, Russian, Hebrew) I am depending on the UTF-8 environment, I would be more happy to see at least the filenames and editor issues addressed earlier (I can live with the English localization of the menus etc ;) As Egmont already wrote almost a year ago: There are patches available with the sources from Fedora and SuSE. For an experienced programmer, hence, it should not be too difficult to apply them?
Comment 3 by Miguel Pérez <wiseman1024> at Wed 20 Sep 2006 03:47:07 PM UTC:
I've been using SuSE's mc for a year, dealing with files with non-ASCII characters (even CJK), as well as editing them and introducing these characters myself, without ever having a single problem. Can somebody post a link to the patches of SuSE or Fedora? I could try to apply them myself if I'm going to compile mc from source.
Comment 4 by Egmont Koblinger <egmont> at Wed 20 Sep 2006 04:53:15 PM UTC:
ftp://ftp.suse.com/pub/suse/i386/9.3/suse/src/ http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/mc-4.6.1a-28.fc6.src.rpm Download the mc-*.src.rpm file, press Enter on it in mc, you'll see the source and patches, as well as the order in which the patches should be applied are listed in the mc.spec file. Further patches can be found here: https://svn.uhulinux.hu/packages/2.0/mc/patches/ these apply to mc 4.6.1, should be applied in numerical order, the utf8 related patches are numbered as 00-*. Note that you need either slang 2, or a patched version of slang 1.
Comment 5 by Egmont Koblinger <egmont> at Wed 20 Sep 2006 04:56:31 PM UTC:
Sorry, the Fedora URL was meant to be http://download.fedora.redhat.com/pub/fedora/linux/core/development/source/SRPMS/ check the directory listing for the exact filename.
Comment 6 by tony thedford <tonythed> at Fri 09 Mar 2007 08:31:57 PM UTC:
Non-support of UTF-8 is a real problem for many server administrators. MC is the only capable text based file manager available for server administration over remote terminal access. Using the reduced character set mode ( mc -a ) is definitely a sub-optimal solution. It would be very helpful is this issue gets fixed.
Attachments
Change History
comment:2 Changed 16 years ago by slavazanko
- Status changed from new to accepted
- Owner set to slavazanko
- Milestone changed from Recode Support to UTF8 Support
I propose this patches: http://www.fi.muni.cz/~xbenes5/projects/mc/mc-utf8.tar.gz
Link from: http://mail.gnome.org/archives/mc-devel/2007-December/msg00001.html
IMHO, this more right patches than patches from Fedora, Suse etc (no stupid #ifdef..#else...#endif in many source files).
BTW, my global idea: in future gather #ifdef...#endif in one place (mclib?); other source files must be cleaned from # ifdef ... # endif as is possible.
Also, present branch 'utf-8' with this patches.
UTF-8 was added in version 4.6.3, but it is not complete.
There is no conversion of file names in UTF-8 locales.
Also, no conversion to/from UTF-8 in editor/viewer with 8-bit system locales