Author Topic: invalid source files  (Read 4630 times)

Offline Newbie0815

  • Multiple posting newcomer
  • *
  • Posts: 61
invalid source files
« on: November 02, 2011, 07:55:38 pm »
I´m writing a cpp file in C::B editor, where due a few special characters I´m using C::B sets the encoding of the file to UTF-8.
That´s all fine.

Now I open this file with another editor, such as Windows-Notepad and save it again (without any changes).

From here on, i.e. if I try to rebuild the project, C::B will tell me, the file is invalid.
The only way I found how to solve this is create a new file and copy&paste the content of the old file from Windows-Notepad to C::B editor.

My guess is, Windows-Notepad is obviously not the best choice, it might save the file in different encoding and/or add a BOM or something.
Actually I didn´t resave the file on purpose, was just a clicking mistake when I tried to quick look up a piece of text from the file.
Anyway, is there a way to fix the invalid file without recreating it?

Offline oBFusCATed

  • Developer
  • Lives here!
  • *****
  • Posts: 13406
    • Travis build status
Re: invalid source files
« Reply #1 on: November 02, 2011, 08:09:01 pm »
General advices:
1. use only ascii characters in c/c++ sources
2. use VCS
(most of the time I ignore long posts)
[strangers don't send me private messages, I'll ignore them; post a topic in the forum, but first read the rules!]