Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Why does gcc have "â" in all its error messages?

Tags:

c

linux

gcc

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: error: expected â, â, â, â or â before â token

Has anyone else seen this before? (Needless to say, it's difficult to Google for.)

(This is on Ubuntu 8.10)

Edit: The guy at http://ubuntuforums.org/showthread.php?t=252832 says to set LC_MESSAGES=en_US but that doesn't do anything for me.

like image 763
mike Avatar asked Feb 13 '09 18:02

mike


2 Answers

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.

like image 158
mike Avatar answered Nov 09 '22 22:11

mike


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.

like image 7
theomega Avatar answered Nov 09 '22 22:11

theomega