Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Please remove stupid charset confirmation on startup #1613

Closed
mc-butler opened this issue Sep 14, 2009 · 9 comments
Closed

Please remove stupid charset confirmation on startup #1613

mc-butler opened this issue Sep 14, 2009 · 9 comments
Assignees
Labels
area: core Issues not related to a specific subsystem prio: blocker This problem will block progress ver: 4.7.0-pre4 Reproducible in version 4.7.0-pre4
Milestone

Comments

@mc-butler
Copy link

Important

This issue was migrated from Trac:

Origin https://midnight-commander.org/ticket/1613
Reporter egmont (@egmontkob)

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.)

Note

Original attachments:

@mc-butler
Copy link
Author

Changed by zaytsev (@zyv) on Sep 16, 2009 at 8:18 UTC (comment 1)

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.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 4, 2009 at 9:25 UTC (comment 2)

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

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.

@mc-butler
Copy link
Author

Changed by egmont (@egmontkob) on Nov 4, 2009 at 9:26 UTC

screenshot at first startup

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Nov 4, 2009 at 10:20 UTC (comment 3)

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

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Nov 9, 2009 at 10:49 UTC (comment 4)

  • Severity changed from no branch to on review

Created branch 1613_remove_charset_confirmation

Initial changeset: [1ce774def07caaf867d395ff80483b7408ba2778]

Review, please.

@mc-butler
Copy link
Author

Changed by andrew_b (@aborodin) on Nov 13, 2009 at 12:47 UTC (comment 5)

  • Votes set to andrew_b

@mc-butler
Copy link
Author

Changed by iNode (@iNode) on Nov 19, 2009 at 7:39 UTC (comment 6)

  • Severity changed from on review to approved
  • Votes changed from andrew_b to andrew_b iNode

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Nov 19, 2009 at 8:52 UTC (comment 7)

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

merge [b2f1b0b]

@mc-butler
Copy link
Author

Changed by slavazanko (@slavaz) on Nov 19, 2009 at 8:52 UTC (comment 8)

  • Status changed from testing to closed

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
area: core Issues not related to a specific subsystem prio: blocker This problem will block progress ver: 4.7.0-pre4 Reproducible in version 4.7.0-pre4
Development

No branches or pull requests

2 participants