Ticket #1613 (closed defect: fixed)

Opened 9 years ago

Last modified 9 years ago

Please remove stupid charset confirmation on startup

Reported by: egmont Owned by: slavazanko
Priority: blocker Milestone: 4.7.0
Component: mc-core Version: 4.7.0-pre4
Keywords: Cc:
Blocked By: Blocking:
Branch state: Votes for changeset: committed-master

Description

mc 4.7.0-pre2 with --enable-charset; ~/.mc removed. Fully UTF-8 environment.

When I start mc, it gives me a confirm dialog: "Chosen display charset or source codeset does not match one set via locale. Blahblah. <Fix it> <Skip>".

This dialog doesn't make sense for various reasons.

First, users don't read. And even if they do read it, they likely don't understand. Even if they understand, they'd have to have some knowledge about charsets and mc's way of implementing them. They don't have it.

After choosing "skip", special characters in mc's viewer and editor are horribly broken, and they remain broken no matter what codepage you choose with Ctrl-T.

However, choosing "fix it" fixes everything.

An application shouldn't ask the user whether it should behave correctly or not. Especially not in a way that it's not clear which one the correct answer is. An application should behave correctly, without asking the user, and without even giving a config option where the user can break it.

On systems with locale support applications all have to trust the LANG/LC_* variables. There are only a very few apps that let you override them, and I consider all of them buggy in this respect: they shouldn't allow. If you've misconfigured any of these variables, there's absolutely no hope that you'll get a console where you can work with accented letters - basically all applications will behave incorrectly. You should fully trust in those variables and fully respect them. If they are messed up, that's not mc's problem. I see no reason why mc should ever override them, and I especially see no reason why mc should do it by asking the user on first startup.

In a fully UTF-8 environment, which is provided by all modern distributions, mc should just use UTF-8 everywhere, without asking.

(It might make sense to configure charset and such things inside mc on systems without locale support. However, this particular dialog is about some mismatch between the locale and something else - so this particular dialog just never makes sense.)

Attachments

mc-4.7-pre4-startup.png (20.7 KB) - added by egmont 9 years ago.
screenshot at first startup

Change History

comment:1 Changed 9 years ago by zaytsev

Yeah, I also asked to Iliya to remove this, but nobody was really interested into it.

The real problem with this dialog is that it appears when you have e.g. set a CP1251 encoding in the editor, you leave mc and then start it again (and the locale is still UTF8). Unless we have a per-file encoding history I think that mc should just reset it to UTF8, which it does if you press FIX IT. But the real trouble is that if you press FIX, but tick the checkbox, next time it will silently choose SKIP which is COUNTER-INTUITIVE.

I would vote for removing it altogether and having mc automatically fix it no matter what.

comment:2 Changed 9 years ago by egmont

  • Priority changed from major to blocker
  • Version changed from 4.7.0-pre2 to 4.7.0-pre4

Still present in mc-4.7.0-pre4. I attach a screenshot. There are three bugs:

  • If Hungarian (LANG=hu_HU.UTF-8), the layout is just simply incorrect, some part of the text is wider than the bounding rectangle. I haven't checked other locales.
  • The text still refers to Ctrl-t as the shortcut, which has been changed to Alt-e. (Also buggy in the English version)
  • But the far most important is what I wrote in the original bugreport:

I have a modern, by default fully UTF-8 system. I have hundreds, if not thousands of applications that just handle accented letters correctly. Midnight commander, on the other hand, when started up for the first time, does have to ask a question about how to set up accented letter support - a question that I don't understand and don't know how to answer, even though I do have quite a lot of experience with charset and stuff. How would a simple average user understand a single bit of it? Why can't mc just work correctly on its own? Without asking the user? Without presenting a terrible user experience right as its very first step?

I'm really grateful for everyone's hard work adding UTF-8 support for mc. Really, seriously, huge kudos! But I feel that after understanding how UTF-8 as a character set works and coming up with the implementation, it would be nice if you would also try to understand the philosophy behind, the whole point of Unicode, and why this is such a cool thing - if, and only if, developers understand and follow this philosophy, instead of annoying users with braindamaged questions saying "sorry, I'm the developer, but I don't know how to do this correctly, could you dear user please help me?".

I think it's unacceptable to release a new version of mc, claiming UTF-8 support as one of its most important new features, that for most of the users would start up with this insane question, instead of the standard two blue panels.

Changed 9 years ago by egmont

screenshot at first startup

comment:3 Changed 9 years ago by slavazanko

  • Owner set to slavazanko
  • Status changed from new to accepted
  • Milestone changed from 4.7 to 4.7.0

comment:4 Changed 9 years ago by slavazanko

  • severity changed from no branch to on review

Created branch 1613_remove_charset_confirmation

Initial changeset: 1ce774def07caaf867d395ff80483b7408ba2778

Review, please.

comment:5 Changed 9 years ago by andrew_b

  • Votes for changeset set to andrew_b

comment:6 Changed 9 years ago by iNode

  • Votes for changeset changed from andrew_b to andrew_b iNode
  • severity changed from on review to approved

comment:7 Changed 9 years ago by slavazanko

  • Status changed from accepted to testing
  • Votes for changeset changed from andrew_b iNode to commited-master
  • Resolution set to fixed
  • severity changed from approved to merged

comment:8 Changed 9 years ago by slavazanko

  • Status changed from testing to closed
Note: See TracTickets for help on using tickets.