[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


http://bugs.llvm.org/show_bug.cgi?id=32127

            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
^M
ksh-3.2$

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

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
x86_64-pc-windows-msvc
...

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