Tell me more ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

i'm using the KDE console (konsole) and when i compile foo.c (empty file) with the following cmdline:

gcc foo.c

I get the following error message:

foo.c:1:1: error: expected â=â, â,â, â;â, âasmâ or â__attribute__â at end of input

When i run the compile the same foo.c with this cmdline:

LANG=C gcc foo.c

i get the correct output:

foo.c:1:1: error: expected '=', ',', ';', 'asm' or '__attribute__' at end of input

But i can't figure out what's wrong on my system. Ideas?

share|improve this question
What Ubuntu version are you running? I'm getting a different error when compiling an empty file x.c. Can you add the output of locale to your question? – Lekensteyn Apr 14 '11 at 14:22
This question appears to be abandoned as there hasn't been any activity for a longer period of time. I'm voting to close it for now. If by any reason you think this question is still viable or useful in anyways or that there is still a good chance it will be answered please flag it to a moderator or add a comment with the reasons why you want it reopened. Thanks! – htorque Feb 23 '12 at 18:38

closed as too localized by htorque, jokerdino, jrg Feb 25 '12 at 13:38

This question is unlikely to help any future visitors; it is only relevant to a small geographic area, a specific moment in time, or an extraordinarily narrow situation that is not generally applicable to the worldwide audience of the internet. For help making this question more broadly applicable, see the FAQ.

1 Answer

It looks like a misconfiguration of your Konsole profile, which causes the output be interpreted as ISO-8859-1.

  1. Go to Settings -> Configure Profiles....
  2. Press Edit Profile...
  3. Go to the tab Advanced
  4. At Encoding, press the button Select and choose Unicode -> UTF-8.
  5. Press Ok, OK and you're done.
share|improve this answer
Thanks for hint, but the encoding is already UTF-8. – Andreas Roth Apr 14 '11 at 6:19

Not the answer you're looking for? Browse other questions tagged or ask your own question.