Why does gcc have “â” in all its error messages?

前端 未结 3 374
[愿得一人]
[愿得一人] 2020-12-31 08:11

For some reason, my installation of gcc seems to be printing an \"a with a carat\" character in place of all %s\'s in its error messages, e.g.,

test.c:4: err         


        
相关标签:
3条回答
  • 2020-12-31 08:57

    What is your LANG-Settings (call "export" on a bash in a terminal)? Try setting the Lang to a correct value like

    LANG="en_US.UTF-8"

    using

    declare -x LANG="en_US.UTF-8"

    This seems to be a charset-problem, so perhaps you want to double-check using the right one.

    0 讨论(0)
  • 2020-12-31 08:59

    Aha! The problem was that I have LANG=en_US.UTF-8 and was using xterm. Apparently, that's no good. By setting LANG=C or LANG=en_US, everything's great now.

    0 讨论(0)
  • 2020-12-31 09:08

    Seems like madness to me, but I just wanted to put in that you may be able to Google for it more easily by calling the ^ a circumflex, which is what it's usually called when used as an accent.

    0 讨论(0)
提交回复
热议问题