On macos, LC_CTYPE set to wrong value - where to change for iTerm2?












0















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.










share|improve this question





























    0















    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.










    share|improve this question



























      0












      0








      0








      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.










      share|improve this question
















      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






      share|improve this question















      share|improve this question













      share|improve this question




      share|improve this question








      edited Jan 31 at 8:12







      Alexander Skwar

















      asked Jan 31 at 8:06









      Alexander SkwarAlexander Skwar

      26115




      26115






















          1 Answer
          1






          active

          oldest

          votes


















          1














          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.



          iTerm2 Preferences -> 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=





          share|improve this answer























            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
            });


            }
            });














            draft saved

            draft discarded


















            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









            1














            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.



            iTerm2 Preferences -> 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=





            share|improve this answer




























              1














              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.



              iTerm2 Preferences -> 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=





              share|improve this answer


























                1












                1








                1







                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.



                iTerm2 Preferences -> 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=





                share|improve this answer













                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.



                iTerm2 Preferences -> 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=






                share|improve this answer












                share|improve this answer



                share|improve this answer










                answered Jan 31 at 8:06









                Alexander SkwarAlexander Skwar

                26115




                26115






























                    draft saved

                    draft discarded




















































                    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.




                    draft saved


                    draft discarded














                    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





















































                    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







                    Popular posts from this blog

                    flock() on closed filehandle LOCK_FILE at /usr/bin/apt-mirror

                    Mangá

                     ⁒  ․,‪⁊‑⁙ ⁖, ⁇‒※‌, †,⁖‗‌⁝    ‾‸⁘,‖⁔⁣,⁂‾
”‑,‥–,‬ ,⁀‹⁋‴⁑ ‒ ,‴⁋”‼ ⁨,‷⁔„ ‰′,‐‚ ‥‡‎“‷⁃⁨⁅⁣,⁔
⁇‘⁔⁡⁏⁌⁡‿‶‏⁨ ⁣⁕⁖⁨⁩⁥‽⁀  ‴‬⁜‟ ⁃‣‧⁕‮ …‍⁨‴ ⁩,⁚⁖‫ ,‵ ⁀,‮⁝‣‣ ⁑  ⁂– ․, ‾‽ ‏⁁“⁗‸ ‾… ‹‡⁌⁎‸‘ ‡⁏⁌‪ ‵⁛ ‎⁨ ―⁦⁤⁄⁕