Ticket #3809 (new defect)

Opened 8 years ago

Last modified 8 years ago

Configured codepage ignored

Reported by: dveiga Owned by:
Priority: minor Milestone: Future Releases
Component: mc-core Version: master
Keywords: Cc: egmont, kloczek
Blocked By: Blocking:
Branch state: no branch Votes for changeset:

Description

MC is displaying itself in iso8859-1, ignoring the configured codepage:

# set | grep LANG
LANG=en_US.UTF-8

The codepage configured in Options->Display Bits is also UTF-8.

Relase info:
LC_MESSAGES=C mc -V
GNU Midnight Commander 4.8.19
Built with GLib 2.52.0
Using the ncurses library
With builtin Editor
With subshell support as default
With support for background operations
With mouse support on xterm and Linux console
With internationalization support
With multiple codepages support
Virtual File Systems: cpiofs, tarfs, sfs, extfs, ftpfs, sftpfs, fish, smbfs
Data types: char: 8; int: 32; long: 64; void *: 64; size_t: 64; off_t: 64;

LC_MESSAGES=C mc -F
Home directory: /root
Profile root directory: /root

[System data]

Config directory: /etc/mc/
Data directory: /usr/share/mc/
File extension handlers: /usr/libexec/mc/ext.d/
VFS plugins and scripts: /usr/libexec/mc/

extfs.d: /usr/libexec/mc/extfs.d/
fish: /usr/libexec/mc/fish/

[User data]

Config directory: /root/.config/mc/
Data directory: /root/.local/share/mc/

skins: /root/.local/share/mc/skins/
extfs.d: /root/.local/share/mc/extfs.d/
fish: /root/.local/share/mc/fish/
mcedit macros: /root/.local/share/mc/mc.macros
mcedit external macros: /root/.local/share/mc/mcedit/macros.d/macro.*

Cache directory: /root/.cache/mc/

If I can help please let me know. Thanks!

Daniel

Change History

comment:1 Changed 8 years ago by andrew_b

Related to #3820.

comment:2 Changed 8 years ago by egmont

  • Cc egmont added

Could you please attach a screenshot?

comment:3 Changed 8 years ago by egmont

Using the ncurses library

Note that this is "ncurses", not "ncursesw". Could easily be the source of some problems.

comment:4 follow-up: ↓ 5 Changed 8 years ago by egmont

Oops, mc here seems to report whichever value was given to --with-screen=..., not the library it is actually linked against (and even in case of --with-screen=ncurses it prefers to link against ncursesw, if available). So this could be a false alarm.

comment:5 in reply to: ↑ 4 Changed 8 years ago by andrew_b

Replying to egmont:

Oops, mc here seems to report whichever value was given to --with-screen=..., not the library it is actually linked against (and even in case of --with-screen=ncurses it prefers to link against ncursesw, if available). So this could be a false alarm.

For the record: #3628.

comment:6 Changed 8 years ago by dveiga

The solution proposed for #3820 (export NCURSES_NO_UTF8_ACS=1) solves the problem. If that is the intended solution (manualy setting that variable), I believe this issue can be closed.

Last edited 8 years ago by andrew_b (previous) (diff)

comment:7 Changed 8 years ago by egmont

If that is the intended solution (manualy setting that variable), I believe this issue can be closed.

I dislike this generic attitude. Software should work out of the box, not after googling and manually hacking things around.

That being said, as far as mc is concerned, the resolution might be closing this ticket with something like resolved notmc if we agree the problem should be addressed elsewhere and not even workedaround in mc. But the problem definitely should be addressed somewhere.

comment:8 Changed 8 years ago by zaytsev

  • Cc kloczek added

@kloczek, FYI.

@egmont, as in patch mc wrapper for distros that use it, and use ncurses at the same time, like Fedora? Not that I feel good about this, but sounds very pragmatic.

comment:9 Changed 8 years ago by egmont

If we decide to workaround the problem, I'd say:

  • Put the workaround in the mc binary, not the wrapper script. I guess a setenv() before initializing ncurses would do.
  • Check if there's a better way of telling this to ncurses rather than the env var.
  • Make sure the env var doesn't break anything with non-UTF-8, or set only conditionally.
  • Restore the previous value (or lack thereof) before launching any external process.
Note: See TracTickets for help on using tickets.