On macos, LC_CTYPE set to wrong value - where to change for iTerm2?
On my system, the locale variable LC_CTYPE
is set to an illegal value, which causes issues on Linux systems. It's set to:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
LC_CTYPE=UTF-8
is not a legal value on Linux; eg.:
$ ssh front1
Linux front1 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
The programs included with the Debian GNU/Linux system are free software;
…
alex@front1 ~> perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US").
But where does LC_CTYPE
get set in the first place? It's not in any file in /etc
or $HOME
(I did a sudo fgrep -ri LC_CTYPE /etc $HOME
).
I'm using iTerm2 as my terminal application.
macos shell iterm2 locale
add a comment |
On my system, the locale variable LC_CTYPE
is set to an illegal value, which causes issues on Linux systems. It's set to:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
LC_CTYPE=UTF-8
is not a legal value on Linux; eg.:
$ ssh front1
Linux front1 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
The programs included with the Debian GNU/Linux system are free software;
…
alex@front1 ~> perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US").
But where does LC_CTYPE
get set in the first place? It's not in any file in /etc
or $HOME
(I did a sudo fgrep -ri LC_CTYPE /etc $HOME
).
I'm using iTerm2 as my terminal application.
macos shell iterm2 locale
add a comment |
On my system, the locale variable LC_CTYPE
is set to an illegal value, which causes issues on Linux systems. It's set to:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
LC_CTYPE=UTF-8
is not a legal value on Linux; eg.:
$ ssh front1
Linux front1 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
The programs included with the Debian GNU/Linux system are free software;
…
alex@front1 ~> perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US").
But where does LC_CTYPE
get set in the first place? It's not in any file in /etc
or $HOME
(I did a sudo fgrep -ri LC_CTYPE /etc $HOME
).
I'm using iTerm2 as my terminal application.
macos shell iterm2 locale
On my system, the locale variable LC_CTYPE
is set to an illegal value, which causes issues on Linux systems. It's set to:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
LC_CTYPE=UTF-8
is not a legal value on Linux; eg.:
$ ssh front1
Linux front1 3.16.0-7-amd64 #1 SMP Debian 3.16.59-1 (2018-10-03) x86_64
The programs included with the Debian GNU/Linux system are free software;
…
alex@front1 ~> perl
perl: warning: Setting locale failed.
perl: warning: Please check that your locale settings:
LANGUAGE = (unset),
LC_ALL = (unset),
LC_CTYPE = "UTF-8",
LANG = "en_US"
are supported and installed on your system.
perl: warning: Falling back to a fallback locale ("en_US").
But where does LC_CTYPE
get set in the first place? It's not in any file in /etc
or $HOME
(I did a sudo fgrep -ri LC_CTYPE /etc $HOME
).
I'm using iTerm2 as my terminal application.
macos shell iterm2 locale
macos shell iterm2 locale
edited Jan 31 at 8:12
Alexander Skwar
asked Jan 31 at 8:06
Alexander SkwarAlexander Skwar
26115
26115
add a comment |
add a comment |
1 Answer
1
active
oldest
votes
After a bit of ddg, I came about the blog post Setting locales correctly on Mac OSX Terminal application on Remi Bergsma's blog. Turns out, also iTerm2 has such a setting. Disabling it, makes iTerm2 not mess up the locale.
Now it's set like this:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Which isn't great either, as I've set my system to Swiss German. The normale terminal application is better in that respect:
$ locale
LANG="de_CH.UTF-8"
LC_COLLATE="de_CH.UTF-8"
LC_CTYPE="de_CH.UTF-8"
LC_MESSAGES="de_CH.UTF-8"
LC_MONETARY="de_CH.UTF-8"
LC_NUMERIC="de_CH.UTF-8"
LC_TIME="de_CH.UTF-8"
LC_ALL=
add a comment |
Your Answer
StackExchange.ready(function() {
var channelOptions = {
tags: "".split(" "),
id: "3"
};
initTagRenderer("".split(" "), "".split(" "), channelOptions);
StackExchange.using("externalEditor", function() {
// Have to fire editor after snippets, if snippets enabled
if (StackExchange.settings.snippets.snippetsEnabled) {
StackExchange.using("snippets", function() {
createEditor();
});
}
else {
createEditor();
}
});
function createEditor() {
StackExchange.prepareEditor({
heartbeatType: 'answer',
autoActivateHeartbeat: false,
convertImagesToLinks: true,
noModals: true,
showLowRepImageUploadWarning: true,
reputationToPostImages: 10,
bindNavPrevention: true,
postfix: "",
imageUploader: {
brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
allowUrls: true
},
onDemand: true,
discardSelector: ".discard-answer"
,immediatelyShowMarkdownHelp:true
});
}
});
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%2fsuperuser.com%2fquestions%2f1400418%2fon-macos-lc-ctype-set-to-wrong-value-where-to-change-for-iterm2%23new-answer', 'question_page');
}
);
Post as a guest
Required, but never shown
1 Answer
1
active
oldest
votes
1 Answer
1
active
oldest
votes
active
oldest
votes
active
oldest
votes
After a bit of ddg, I came about the blog post Setting locales correctly on Mac OSX Terminal application on Remi Bergsma's blog. Turns out, also iTerm2 has such a setting. Disabling it, makes iTerm2 not mess up the locale.
Now it's set like this:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Which isn't great either, as I've set my system to Swiss German. The normale terminal application is better in that respect:
$ locale
LANG="de_CH.UTF-8"
LC_COLLATE="de_CH.UTF-8"
LC_CTYPE="de_CH.UTF-8"
LC_MESSAGES="de_CH.UTF-8"
LC_MONETARY="de_CH.UTF-8"
LC_NUMERIC="de_CH.UTF-8"
LC_TIME="de_CH.UTF-8"
LC_ALL=
add a comment |
After a bit of ddg, I came about the blog post Setting locales correctly on Mac OSX Terminal application on Remi Bergsma's blog. Turns out, also iTerm2 has such a setting. Disabling it, makes iTerm2 not mess up the locale.
Now it's set like this:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Which isn't great either, as I've set my system to Swiss German. The normale terminal application is better in that respect:
$ locale
LANG="de_CH.UTF-8"
LC_COLLATE="de_CH.UTF-8"
LC_CTYPE="de_CH.UTF-8"
LC_MESSAGES="de_CH.UTF-8"
LC_MONETARY="de_CH.UTF-8"
LC_NUMERIC="de_CH.UTF-8"
LC_TIME="de_CH.UTF-8"
LC_ALL=
add a comment |
After a bit of ddg, I came about the blog post Setting locales correctly on Mac OSX Terminal application on Remi Bergsma's blog. Turns out, also iTerm2 has such a setting. Disabling it, makes iTerm2 not mess up the locale.
Now it's set like this:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Which isn't great either, as I've set my system to Swiss German. The normale terminal application is better in that respect:
$ locale
LANG="de_CH.UTF-8"
LC_COLLATE="de_CH.UTF-8"
LC_CTYPE="de_CH.UTF-8"
LC_MESSAGES="de_CH.UTF-8"
LC_MONETARY="de_CH.UTF-8"
LC_NUMERIC="de_CH.UTF-8"
LC_TIME="de_CH.UTF-8"
LC_ALL=
After a bit of ddg, I came about the blog post Setting locales correctly on Mac OSX Terminal application on Remi Bergsma's blog. Turns out, also iTerm2 has such a setting. Disabling it, makes iTerm2 not mess up the locale.
Now it's set like this:
$ locale
LANG=
LC_COLLATE="C"
LC_CTYPE="en_US.UTF-8"
LC_MESSAGES="C"
LC_MONETARY="C"
LC_NUMERIC="C"
LC_TIME="C"
LC_ALL=
Which isn't great either, as I've set my system to Swiss German. The normale terminal application is better in that respect:
$ locale
LANG="de_CH.UTF-8"
LC_COLLATE="de_CH.UTF-8"
LC_CTYPE="de_CH.UTF-8"
LC_MESSAGES="de_CH.UTF-8"
LC_MONETARY="de_CH.UTF-8"
LC_NUMERIC="de_CH.UTF-8"
LC_TIME="de_CH.UTF-8"
LC_ALL=
answered Jan 31 at 8:06
Alexander SkwarAlexander Skwar
26115
26115
add a comment |
add a comment |
Thanks for contributing an answer to Super User!
- Please be sure to answer the question. Provide details and share your research!
But avoid …
- Asking for help, clarification, or responding to other answers.
- Making statements based on opinion; back them up with references or personal experience.
To learn more, see our tips on writing great answers.
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%2fsuperuser.com%2fquestions%2f1400418%2fon-macos-lc-ctype-set-to-wrong-value-where-to-change-for-iterm2%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