Hello, I am using Code::Blocks, and recently any time I try to compile any program I get the errors "stray '\302' in program" and "stray '\206' in program" about every 20-30 lines. I know how to fix these (by deleting the non printing character(s) in the line in question) but I don't know how to prevent them. Does anybody know what is causing this issue? I am using the dvorak keyboard layout which is being emulated by my OS (IE using the language tools rather than a hard wired keyboard), but this never used to happen with that. It is really annoying to have to go back through my code and delete the '\302' and '\206' instances (and by the way, deleting them takes me just 1 backspace per pair). I have a large project due in a couple of weeks with multiple files each with multiple thousands of lines of code, and I would like to know what is causing these strays before I start the project. Any help will be greatly appreciated. Thank you.

Recommended Answers

All 2 Replies

That usually only happens when you're trying to open or copy/paste files that were written on another system or with a less than friendly text editor. Does it happen when you write code directly in Code::Blocks?

Yes, usually at the end of a line. It seems that when I hit enter sometimes it prints '\302' '\206' '\n' instead of just the newline.

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.