Note that there are some explanatory texts on larger screens.

plurals
  1. PO
    text
    copied!<p>I've fossicked around a bit more, and I've worked out a tentative solution. I'm not completely happy with it because it involves modifying the source, whereas I was actually looking for a piped solution, but it seems that g++.exe only accepts command line args (please correct me if I'm wrong).</p> <p>My "solution" is a bit rough-and-ready, but it works, and is certainly better (for me) than any other viable solution I've come across (which is none!) It requires due attention be paid to your editor's "File has been externally modified" message-box (if the file is being edited), but in fact, the BOM is still in the editor, so it is somewhat of a moot point. </p> <p>It is a simple command line hack. I'd prefer a more-integrated option, but here is this one (and it works):</p> <p>In Codeblocks, go to: Settings -> Compiler and Debugger -> Other settings -> [Advanced options] -> Command line macro:</p> <p>Make these mods to the command line. They should all be on a single line (of course), but for clarity I've seperated them out:</p> <pre><code>cmd /c DropTheBOM.exe $file &amp; $compiler $options $includes -c $file -o $object // (use your compiler cmdline) &amp; MakeTheBOM.exe $file // Write your own utils, or try here: http://code.google.com/p/utf-bom-utils/ </code></pre> <p>PS: #include files are not stripiped of their BOM (if they have one).. A simple BOM y/n arg switch for the routine which #includes these files would solve this issue quite simply... (but it is only a Windows problem... maybe thats why it hasn't been catered for... or has it? Does anyone know? </p>
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload