How to set LANG in locale, despite it's in /etc/default/locale in ubuntu for unicode support?
up vote
7
down vote
favorite
I run Ubuntu 12.04
, I can't set the locale to en_US.utf8
. I set the LANG
by configuring /etc/default/locale
as described here.
$cat /etc/default/locale
LANG=en_US.utf8
$locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX
But it doesn't work, as you can see above. How do I set this LANG
variable to en_US.utf8
?
The reason I am asking is, when I run echo -e "x03bb"
, I get a unicode greek letter lambda symbol
displayed correctly, but my issue is with emacs. In the emacs, I can't display unicode symbols, eg: C-x 8 RET 03bb
outputs u03bb
, instead of a greek letter lambda symbol
. I thought the issue is with these locale settings, but I can't set them.
Edit:
I think the problem is fixed.
$su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
LANG=en_US
LANGUAGE=en_US
==
LANG=en_US
LANGUAGE=en_US
The solution for me was, I was using mintty to ssh into Ubuntu 12.04
, so I had to configure
Server Edition~/.pam_environment
and
~/.etc/ssh_config
, and ~/bashrc
. But my real issue with emacs was
not about this ubuntu configuration, so I have no idea what this
LANG
variable configuration is used for or if I set it to correct values.
Edit 2:
Here are the steps I've taken to solve this, following the suggestions
of ansivirus from the #ubuntu irc channel:
Add this to ~/.bash_profile
export LANGUAGE="en"
export LANG="C"
export LC_MESSAGES="C"
Add this to ~/.pam_environment
(so this must be problematic)
LANG=en_US
LANGUAGE=en_US
Add this to /etc/ssh/sshd_config
UsePAM yes
Comment out this in /etc/ssh/ssh_config
# SendEnv LANG LC_*
ubuntu configuration emacs locale unicode
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
|
show 1 more comment
up vote
7
down vote
favorite
I run Ubuntu 12.04
, I can't set the locale to en_US.utf8
. I set the LANG
by configuring /etc/default/locale
as described here.
$cat /etc/default/locale
LANG=en_US.utf8
$locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX
But it doesn't work, as you can see above. How do I set this LANG
variable to en_US.utf8
?
The reason I am asking is, when I run echo -e "x03bb"
, I get a unicode greek letter lambda symbol
displayed correctly, but my issue is with emacs. In the emacs, I can't display unicode symbols, eg: C-x 8 RET 03bb
outputs u03bb
, instead of a greek letter lambda symbol
. I thought the issue is with these locale settings, but I can't set them.
Edit:
I think the problem is fixed.
$su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
LANG=en_US
LANGUAGE=en_US
==
LANG=en_US
LANGUAGE=en_US
The solution for me was, I was using mintty to ssh into Ubuntu 12.04
, so I had to configure
Server Edition~/.pam_environment
and
~/.etc/ssh_config
, and ~/bashrc
. But my real issue with emacs was
not about this ubuntu configuration, so I have no idea what this
LANG
variable configuration is used for or if I set it to correct values.
Edit 2:
Here are the steps I've taken to solve this, following the suggestions
of ansivirus from the #ubuntu irc channel:
Add this to ~/.bash_profile
export LANGUAGE="en"
export LANG="C"
export LC_MESSAGES="C"
Add this to ~/.pam_environment
(so this must be problematic)
LANG=en_US
LANGUAGE=en_US
Add this to /etc/ssh/sshd_config
UsePAM yes
Comment out this in /etc/ssh/ssh_config
# SendEnv LANG LC_*
ubuntu configuration emacs locale unicode
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What is the output ofsu $USER -c 'env; echo ==; locale' | egrep '==|LANG'
? Are you using the default GUI environment (Unity), if not what are you using, and what display manager?
– Gilles
Oct 31 '14 at 1:13
@Gilles see my edit please thanks.
– user3995789
Oct 31 '14 at 1:27
IsLANG
present when you runsu
but not when you log in over SSH then? What did you change? Note thaten_US
is not a Unicode locale.
– Gilles
Oct 31 '14 at 1:34
@Gilles, see my edit2 please. After taking those steps now LANG is kind of present I think, but I don't know what affect it has, and I don't care because emacs is fixed and I can see the unicode characters fine, I would appreciate an explanation of what these variables mean and what they affect though, thanks.
– user3995789
Oct 31 '14 at 1:50
1
Maybe related to: The correct spelling for the locale is AFAIK en_US.UTF-8, not .utf8
– Jan Henke
Jul 14 '16 at 11:57
|
show 1 more comment
up vote
7
down vote
favorite
up vote
7
down vote
favorite
I run Ubuntu 12.04
, I can't set the locale to en_US.utf8
. I set the LANG
by configuring /etc/default/locale
as described here.
$cat /etc/default/locale
LANG=en_US.utf8
$locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX
But it doesn't work, as you can see above. How do I set this LANG
variable to en_US.utf8
?
The reason I am asking is, when I run echo -e "x03bb"
, I get a unicode greek letter lambda symbol
displayed correctly, but my issue is with emacs. In the emacs, I can't display unicode symbols, eg: C-x 8 RET 03bb
outputs u03bb
, instead of a greek letter lambda symbol
. I thought the issue is with these locale settings, but I can't set them.
Edit:
I think the problem is fixed.
$su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
LANG=en_US
LANGUAGE=en_US
==
LANG=en_US
LANGUAGE=en_US
The solution for me was, I was using mintty to ssh into Ubuntu 12.04
, so I had to configure
Server Edition~/.pam_environment
and
~/.etc/ssh_config
, and ~/bashrc
. But my real issue with emacs was
not about this ubuntu configuration, so I have no idea what this
LANG
variable configuration is used for or if I set it to correct values.
Edit 2:
Here are the steps I've taken to solve this, following the suggestions
of ansivirus from the #ubuntu irc channel:
Add this to ~/.bash_profile
export LANGUAGE="en"
export LANG="C"
export LC_MESSAGES="C"
Add this to ~/.pam_environment
(so this must be problematic)
LANG=en_US
LANGUAGE=en_US
Add this to /etc/ssh/sshd_config
UsePAM yes
Comment out this in /etc/ssh/ssh_config
# SendEnv LANG LC_*
ubuntu configuration emacs locale unicode
I run Ubuntu 12.04
, I can't set the locale to en_US.utf8
. I set the LANG
by configuring /etc/default/locale
as described here.
$cat /etc/default/locale
LANG=en_US.utf8
$locale
LANG=
LANGUAGE=
LC_CTYPE="POSIX"
LC_NUMERIC="POSIX"
LC_TIME="POSIX"
LC_COLLATE="POSIX"
LC_MONETARY="POSIX"
LC_MESSAGES="POSIX"
LC_PAPER="POSIX"
LC_NAME="POSIX"
LC_ADDRESS="POSIX"
LC_TELEPHONE="POSIX"
LC_MEASUREMENT="POSIX"
LC_IDENTIFICATION="POSIX"
LC_ALL=POSIX
But it doesn't work, as you can see above. How do I set this LANG
variable to en_US.utf8
?
The reason I am asking is, when I run echo -e "x03bb"
, I get a unicode greek letter lambda symbol
displayed correctly, but my issue is with emacs. In the emacs, I can't display unicode symbols, eg: C-x 8 RET 03bb
outputs u03bb
, instead of a greek letter lambda symbol
. I thought the issue is with these locale settings, but I can't set them.
Edit:
I think the problem is fixed.
$su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
LANG=en_US
LANGUAGE=en_US
==
LANG=en_US
LANGUAGE=en_US
The solution for me was, I was using mintty to ssh into Ubuntu 12.04
, so I had to configure
Server Edition~/.pam_environment
and
~/.etc/ssh_config
, and ~/bashrc
. But my real issue with emacs was
not about this ubuntu configuration, so I have no idea what this
LANG
variable configuration is used for or if I set it to correct values.
Edit 2:
Here are the steps I've taken to solve this, following the suggestions
of ansivirus from the #ubuntu irc channel:
Add this to ~/.bash_profile
export LANGUAGE="en"
export LANG="C"
export LC_MESSAGES="C"
Add this to ~/.pam_environment
(so this must be problematic)
LANG=en_US
LANGUAGE=en_US
Add this to /etc/ssh/sshd_config
UsePAM yes
Comment out this in /etc/ssh/ssh_config
# SendEnv LANG LC_*
ubuntu configuration emacs locale unicode
ubuntu configuration emacs locale unicode
edited Oct 31 '14 at 1:48
asked Oct 30 '14 at 17:43
user3995789
13614
13614
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
bumped to the homepage by Community♦ 2 days ago
This question has answers that may be good or bad; the system has marked it active so that they can be reviewed.
What is the output ofsu $USER -c 'env; echo ==; locale' | egrep '==|LANG'
? Are you using the default GUI environment (Unity), if not what are you using, and what display manager?
– Gilles
Oct 31 '14 at 1:13
@Gilles see my edit please thanks.
– user3995789
Oct 31 '14 at 1:27
IsLANG
present when you runsu
but not when you log in over SSH then? What did you change? Note thaten_US
is not a Unicode locale.
– Gilles
Oct 31 '14 at 1:34
@Gilles, see my edit2 please. After taking those steps now LANG is kind of present I think, but I don't know what affect it has, and I don't care because emacs is fixed and I can see the unicode characters fine, I would appreciate an explanation of what these variables mean and what they affect though, thanks.
– user3995789
Oct 31 '14 at 1:50
1
Maybe related to: The correct spelling for the locale is AFAIK en_US.UTF-8, not .utf8
– Jan Henke
Jul 14 '16 at 11:57
|
show 1 more comment
What is the output ofsu $USER -c 'env; echo ==; locale' | egrep '==|LANG'
? Are you using the default GUI environment (Unity), if not what are you using, and what display manager?
– Gilles
Oct 31 '14 at 1:13
@Gilles see my edit please thanks.
– user3995789
Oct 31 '14 at 1:27
IsLANG
present when you runsu
but not when you log in over SSH then? What did you change? Note thaten_US
is not a Unicode locale.
– Gilles
Oct 31 '14 at 1:34
@Gilles, see my edit2 please. After taking those steps now LANG is kind of present I think, but I don't know what affect it has, and I don't care because emacs is fixed and I can see the unicode characters fine, I would appreciate an explanation of what these variables mean and what they affect though, thanks.
– user3995789
Oct 31 '14 at 1:50
1
Maybe related to: The correct spelling for the locale is AFAIK en_US.UTF-8, not .utf8
– Jan Henke
Jul 14 '16 at 11:57
What is the output of
su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
? Are you using the default GUI environment (Unity), if not what are you using, and what display manager?– Gilles
Oct 31 '14 at 1:13
What is the output of
su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
? Are you using the default GUI environment (Unity), if not what are you using, and what display manager?– Gilles
Oct 31 '14 at 1:13
@Gilles see my edit please thanks.
– user3995789
Oct 31 '14 at 1:27
@Gilles see my edit please thanks.
– user3995789
Oct 31 '14 at 1:27
Is
LANG
present when you run su
but not when you log in over SSH then? What did you change? Note that en_US
is not a Unicode locale.– Gilles
Oct 31 '14 at 1:34
Is
LANG
present when you run su
but not when you log in over SSH then? What did you change? Note that en_US
is not a Unicode locale.– Gilles
Oct 31 '14 at 1:34
@Gilles, see my edit2 please. After taking those steps now LANG is kind of present I think, but I don't know what affect it has, and I don't care because emacs is fixed and I can see the unicode characters fine, I would appreciate an explanation of what these variables mean and what they affect though, thanks.
– user3995789
Oct 31 '14 at 1:50
@Gilles, see my edit2 please. After taking those steps now LANG is kind of present I think, but I don't know what affect it has, and I don't care because emacs is fixed and I can see the unicode characters fine, I would appreciate an explanation of what these variables mean and what they affect though, thanks.
– user3995789
Oct 31 '14 at 1:50
1
1
Maybe related to: The correct spelling for the locale is AFAIK en_US.UTF-8, not .utf8
– Jan Henke
Jul 14 '16 at 11:57
Maybe related to: The correct spelling for the locale is AFAIK en_US.UTF-8, not .utf8
– Jan Henke
Jul 14 '16 at 11:57
|
show 1 more comment
1 Answer
1
active
oldest
votes
up vote
0
down vote
Try to reinstall locales
apt-get install --reinstall locales
Read more here.
add a comment |
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
up vote
0
down vote
Try to reinstall locales
apt-get install --reinstall locales
Read more here.
add a comment |
up vote
0
down vote
Try to reinstall locales
apt-get install --reinstall locales
Read more here.
add a comment |
up vote
0
down vote
up vote
0
down vote
Try to reinstall locales
apt-get install --reinstall locales
Read more here.
Try to reinstall locales
apt-get install --reinstall locales
Read more here.
edited Sep 18 at 18:27
1st Sentinel 31 Year Perl Hist
21912
21912
answered Oct 21 '15 at 6:13
Володимир Вонс
1
1
add a comment |
add a comment |
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
StackExchange.ready(
function () {
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f165059%2fhow-to-set-lang-in-locale-despite-its-in-etc-default-locale-in-ubuntu-for-uni%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Sign up or log in
StackExchange.ready(function () {
StackExchange.helpers.onClickDraftSave('#login-link');
});
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
Required, but never shown
What is the output of
su $USER -c 'env; echo ==; locale' | egrep '==|LANG'
? Are you using the default GUI environment (Unity), if not what are you using, and what display manager?– Gilles
Oct 31 '14 at 1:13
@Gilles see my edit please thanks.
– user3995789
Oct 31 '14 at 1:27
Is
LANG
present when you runsu
but not when you log in over SSH then? What did you change? Note thaten_US
is not a Unicode locale.– Gilles
Oct 31 '14 at 1:34
@Gilles, see my edit2 please. After taking those steps now LANG is kind of present I think, but I don't know what affect it has, and I don't care because emacs is fixed and I can see the unicode characters fine, I would appreciate an explanation of what these variables mean and what they affect though, thanks.
– user3995789
Oct 31 '14 at 1:50
1
Maybe related to: The correct spelling for the locale is AFAIK en_US.UTF-8, not .utf8
– Jan Henke
Jul 14 '16 at 11:57