- Sponsor
-
Notifications
You must be signed in to change notification settings - Fork 5
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
Interpretation of LANG variable needs to be case insensitive. #2386
Comments
MC doesn't directly interpret the LC_* and LANG variables. It detects the encoding using nl_langinfo (CODESET).
I cannot reproduce this bug on Linux. Both ru_RU.UTF-8 and ru_RU.utf-8 values of LANG are interpreted as utf-8 locale and MC works fine for me with that both values.
I can't find MC details at http://code.google.com/p/iterm2/issues/detail?id=204: MC version, GLib version, wich screen library MC is built with (S-Lang or NCurses). |
MC version has been 4.7.+ (First noticed it with 4.7.0.3 currently using 4.7.4)
glib2 version is 2.22.4
This is on Mac OS X 10.6.4.
And the issue is NOT specific to iTerm either.. the Standard Mac OSX terminal also exhibits the same behavior if the LANG is set to a lowercase utf-8. (the default there is upper case though)
BTW, I can't recreate on my linux box either, only the Mac system. |
I attached a test C++ program that I used for actually a different purpose but it does show some "oddities" between how Mac OS X and Linux return back information about the character set.
Specifically, the nl_langinfo(CODESET); call.
On linux it ALWAYS returns upper case UTF-8 whether the LANG is set to utf-8 or UTF-8. |
|
Branch: 2386_LANG_case_insensitive (parent: master).
urkle, plese test this fix. |
|
|
Merged to master: [91ff90f]. |
Important
This issue was migrated from Trac:
urkle
(urkle@….cc)Related bug in iTerm 2
http://code.google.com/p/iterm2/issues/detail?id=204
When the LANG variable is set to en_US.utf-8 mcedit specifically does not correctly accept input (every character press is interpreted as a '.'). However when LANG is set to en_US.UTF-8 mcedit works correctly.
From the work on the bug against iTerm 2 it was discovered that in reality midnight commander is not handling the LANG and LC_* environment variable correctly.
From the IANA document on character sets.
The character set names may be up to 40 characters taken from the
printable characters of US-ASCII. However, no distinction is made
between use of upper and lower case letters.
http://www.iana.org/assignments/character-sets
Note
Original attachments:
urkle
(urkle@….cc) onOct 14, 2010 at 13:43 UTC
The text was updated successfully, but these errors were encountered: