Midnight Commander within console in UTF-8 mode
Pavel Roskin
proski at gnu.org
Mon Oct 22 05:17:19 UTC 2001
Hello, Andy!
> I've been trying to run MC under console in UTF-8 mode and MC breaks
> in some places displaying non-latin symbols.
> I've tried it with xterm and konsole, putting
> $ export LC_ALL=uk_UA.UTF-8
> $ echo -en "\\033%G"
>
> after these two commands console works just fine with any symbols but
> MC have some glitches.
> I'm using MC-4.5.55 under Mandrake 8.1.
I believe that we should to make sure first that "ls -l" works correctly
under the same conditions. It would be wrong to fix in MC problems that
are not MC-specific. It's very well possible that there is more than one
problem, so it's important to separate them.
Secondly, MC has absolutely no support to the characters of variable
lenght. With UTF-8, you can have 2 bytes representing one character,
which can be as wide as one or two latin characters (the later is unlikely
in Ukrainian, by may happen e.g. in Japanese). MC assumes that one byte
is one character wide (see e.g. name_trunc in src/util.c).
Correcting this assumption will require significant efforts. Patches are
welcome, as usually.
Another smaller problem is that the hints are always displayed in the same
encoding. It could be fixed by translating the hint files into UTF-8 and
translating them to the currently used encoding at runtime.
--
Regards,
Pavel Roskin
More information about the mc-devel
mailing list