Re: mc vs mrxvt, UTF8

wwp via mc <[email protected]> Sun, 3 Nov 2024 13:49:02 +0100
Newsgroups gmane.comp.gnome.apps.mc.general
Message-ID <20241103134852.7210f94b@solud>
Hello Yury,


On Sat, 2 Nov 2024 18:06:29 +0100 "Yury V. Zaytsev via mc" <[email protected]> wrote:

> > On 2. Nov 2024, at 17:41, wwp via mc <[email protected]> wrote:
> > 
> > I'm trying to get mc with UTF-8 support to run in mrxvt, which has no
> > support for it. Of course I know I can switch to another terminal.. but
> > none bring what mrxvt does and the UTF-8 branch of mrxvt is not usable,
> > thus asking here if that sounds possible or not.  
> 
> mc supports UTF-8 in terms of a) printing UTF-8 characters and b) converting UTF-8 characters to the terminal encoding, if it’s different from UTF-8 as long as you build with --enable-charset.
> 
> > Any tips here? The only thing I get if I run mc with LANG/LC_ALL set to
> > en_US.UTF-8 from a mrxvt instance is a broken layout (frames) and UTF-8
> > chars not shown correctly. Tried with slang or ncurses for screen
> > support, no change.  
> 
> This is working exactly as expected. You lie to mc that your terminal supports UTF-8, it starts printing UTF-8 characters and this results in a broken layout.
> 
> You should tell mc which encoding is really supported by your terminal, and it will convert everything it can to this encoding, e.g.
> 
>   LANG=C LC_ALL=en_US.ISO8859-1 mc
> 
> Maybe you should have started by explaining what is not working and what you are trying to achieve in the first place.

Thanks for those explanations.

What I am trying to achieve by using mc sounded obvious to me,
apologies for this: I'm trying to list/manipulate files and folders (mc
does a great job at that) whose names contain UTF-8 characters. At
least list and rename them, by running mc in mrxvt.

What's not working? In such conditions, UTF-8 filenames are not showing
in a human readable manner, and (worst case), mc layout frames (main
screen, dialogs) are shown as broken since every single bar char takes 1-n
characters to display, breaking look and alignment, unless I use `mc -a`.


>   LANG=C LC_ALL=en_US.ISO8859-1 mc

With this (or close to this, -15), I see proper mc frame layouts and
dialogs, but filenames still show undecoded chars.


Regards,

-- 
wwp

-- 
mc mailing list
[email protected]
https://lists.midnight-commander.org/mailman/listinfo/mc
signature.asc (application/pgp-signature, 836 B)
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v2.0.22 (GNU/Linux)

iQIcBAEBAgAGBQJnJ3FEAAoJEEnFZ+hWA4VJZNsP/j8Q6/ZGqaY8KgpAaoOx3dm6
aLHRF/ZoWjNRo7OjcOO+SNrdQWwQd+uI6MGUgM/CGFrXSiI04sKODBPDQJvdFweN
FspXMVvT3lTeS9Hwhy27rDflm1rZrdjPmYyXrV0lqGO7tCBrKibPeTz+lpo4ZL5M
szcVgcXhAIVEc0BGhcoIIQ4Mr0B0oopr5TelVuFpfi+sEJ8oVYgi8CxM0IPzdjgE
PqNK+Nkn2Me/IyekMvoQzLI4Y5K0qzfgkCFiKQPdSm/ZzeZY647T3E6FmgAPFATI
jucEPUr7FgN7MmkB/UZXN9ClsFG5jLW+4i/wV5jMkyl2qIDJDtH38nWsM5kYZteO
3PLBuHRp2dDNejVgxh1mxsSnZaiuOtSx8vuNHo1fkgdsRJyaUtIJYBztgB/1TceZ
nbwVDo8wM1vicRhQ4+zEzuWiOlu59zmKojFoK+159oMdt8lid0R+9ghXJhqHnLf3
DDwWHSSM5xuFyEvardVlMWn2lwDOqsOUFXAjt457J6/zpG5lYWuppOLzQwGj1RXy
4ISnbbCy98tOv2yKJN6B8ApsSHSNq08/roabf4WOSoJTCZrRRbtslPMZNk5FCibg
ej2DGHTvX7sgd2xJRM8B5ZZvJpZdSvFwI2lrcU8ARo2zzfxLODb+mmC8pkwq89VN
wjCQwGEp1ju86fFmrNOa
=xYMA
-----END PGP SIGNATURE-----