Is it possible to get GCC to compile UTF-8 with BOM source files?
I develop C++ cross platform using Microsoft Visual Studio on Windows and GCC on uBuntu Linux. In Visual Studio I can use unicode symbols like " π " and " ² " in my code. Visual Studio always saves the source files as UTF-8 with BOM (Byte Order Mark). For example: // A = π.r² double π = 3.14; GCC happily compiles these files only if I remove the BOM first. If I do not remove the BOM, I get errors like these: wwga_hydutils.cpp:28:9: error: stray ‘\317’ in program wwga_hydutils.cpp:28:9: error: stray ‘\200’ in program Which brings me to the question: Is there a way to get GCC to compile UTF-8