title: How to convert unicode C source code for GCC?
body: <p>I inherited a pretty large C code base that use unicode identifiers widely (UTF-8 encoded).</p>
  
  <p>I have to build it with GCC (any version is fine, but I can't recompile it), and I get a lot of <code>error: stray ‘\302’ in program</code> (763 of these errors).</p>
  
  <p>I cannot simply remove all the unicode characters because of name collisions.<br>
  I cannot use <code>iconv</code> because a certain amount of characters get translated to <code>?</code> that is not valid inside an identifiers (and obviously I cannot replace all <code>?</code> to a different character because the code base also use ternary operator widely).</p>
  
  <p>Is there a better way than manually edit every single unicode character?<br>
  The best solution would be automatic and reversible (just in case GCC finally start supporting unicode properly).</p>
  
  <p><strong>NOTE</strong>: I'm aware of the current <a href="https://stackoverflow.com/questions/7899795/is-it-possible-to-get-gcc-to-compile-utf-8-with-bom-source-files">GCC limitations and of the patch provided</a>, but I cannot rebuild gcc. Moreover what I'm asking for is an automated way to replace all unicode characters at once (in a revertible way, if possible), not a way to preserve them.</p>