Author Topic: stray '\302' and '\250' in program compilation error?  (Read 14549 times)

raylight

  • Guest
stray '\302' and '\250' in program compilation error?
« on: July 20, 2008, 01:41:26 pm »
why do i always have the error then i type printf("z"); ?
btw i am running in ubuntu.. in windows it works fine..
why am i getting this error?

raylight

  • Guest
Re: stray '\302' and '\250' in program compilation error?
« Reply #1 on: July 20, 2008, 01:43:25 pm »
example of my code is:

#include <stdio.h>

int main() {
   printf("zzzz");
   return 0;
}


why am i getting this error? how to get code blocks work in ubuntu?

Offline thomas

  • Administrator
  • Lives here!
  • *****
  • Posts: 3979
Re: stray '\302' and '\250' in program compilation error?
« Reply #2 on: July 20, 2008, 04:48:27 pm »
Because you save your files in a wrong encoding. GCC uses UTF-8 as default on most (all?) platforms. It doesn't take a BOM.
"We should forget about small efficiencies, say about 97% of the time: Premature quotation is the root of public humiliation."