[llvm-bugs] [Bug 32127] New: UTF-16 (LE) byte order mark encoding not supported

via llvm-bugs llvm-bugs at lists.llvm.org
Fri Mar 3 07:52:33 PST 2017


            Bug ID: 32127
           Summary: UTF-16 (LE) byte order mark encoding not supported
           Product: clang
           Version: trunk
          Hardware: PC
                OS: Windows NT
            Status: NEW
          Severity: enhancement
          Priority: P
         Component: C++
          Assignee: unassignedclangbugs at nondot.org
          Reporter: zahira.ammarguellat at intel.com
                CC: dgregor at apple.com, llvm-bugs at lists.llvm.org

UTF-16 encoding in a file or in an included file produces an error.

Simple test case:
ksh-3.2$ cat -v toto.cpp
#include "foo.h"^M

Content of file included in toto.cpp:
ksh-3.2$ cat -v foo.h
^@#^@d^@e^@f^@i^@n^@e^@ ^@r^@ ^@1^@0^@^M^@

When compiling toto.cpp with:

ksh-3.2$ clang-cl -v -c toto.cpp
clang version 5.0.0 (cfe/trunk 296821)
clang -cc1 version 5.0.0 based upon LLVM 5.0.0svn default target

toto.cpp(1,10):  fatal error: UTF-16 (LE) byte order mark detected in
'./foo.h', but encoding is not supported
#include "foo.h"
1 error generated.

I have also tried put the content of foo.h directly in the .cpp file and I get
the same behavior.

You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-bugs/attachments/20170303/4ff19855/attachment-0001.html>

More information about the llvm-bugs mailing list