This is the mail archive of the
mailing list for the GCC project.
question about illegal utf-8 encoding in string literals
- From: "Blower, Melanie" <melanie dot blower at intel dot com>
- To: "gcc at gcc dot gnu dot org" <gcc at gcc dot gnu dot org>
- Date: Wed, 6 Jul 2016 20:47:51 +0000
- Subject: question about illegal utf-8 encoding in string literals
- Authentication-results: sourceware.org; auth=none
I work for Intel on the Intel C++ compiler and we strive to be compatible with the gnu compiler.
We are processing a source file assuming utf-8 encoding and we see a string literal with illegal utf-8 encoding, such as an 8-bit character with the high bit set like 0xa3.
Testing shows that gcc is passes the illegal utf-8 character through without diagnostic message, as though it were an "extended ascii" character.
I don't see a way to enable warnings for this issue.
Please confirm that gcc handles illegal utf-8 encodings this way.
Thanks and regards, Melanie Blower