Code::Blocks Forums

User forums => Using Code::Blocks => Topic started by: raylight on July 20, 2008, 01:41:26 pm

Title: stray '\302' and '\250' in program compilation error?
Post by: raylight 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?
Title: Re: stray '\302' and '\250' in program compilation error?
Post by: raylight 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?
Title: Re: stray '\302' and '\250' in program compilation error?
Post by: thomas 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.