This is the mail archive of the gcc-bugs@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[Bug preprocessor/33415] Can't compile .cpp file with UTF-8 BOM.


http://gcc.gnu.org/bugzilla/show_bug.cgi?id=33415

Vikas <chalakella at yahoo dot com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |chalakella at yahoo dot com

--- Comment #8 from Vikas <chalakella at yahoo dot com> 2013-03-25 05:02:57 UTC ---
Hi Experts

I am facing the same kind of problem......

I had an c++ application which uses unicode string inside it, I had compiled
the solution using Visual Studio 2012. The file is saved in utf-8 with BOM(byte
order marker). When I run the same file in linux, I got the following errors:-
 error: stray '\239' in program
 1: error: stray '\187' in program
 1: error: stray '\191' in program

I found that gcc won't support BOM in the c++ file.If I remove the BOM from the
file error get resolved. Is there a way by which I can compile my application
containing files saved in utf-8 with BOM ?

I am compiling the application in "Red hat enterprise Linux 4 edition" , where
GCC version 3.4.6. 

Please help me in this regard.


Thanks & Regards
 Vikas


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]