<html>
    <head>
      <base href="http://bugs.llvm.org/">
    </head>
    <body><table border="1" cellspacing="0" cellpadding="8">
        <tr>
          <th>Bug ID</th>
          <td><a class="bz_bug_link 
          bz_status_NEW "
   title="NEW - UTF-16 (LE) byte order mark encoding not supported"
   href="http://bugs.llvm.org/show_bug.cgi?id=32127">32127</a>
          </td>
        </tr>

        <tr>
          <th>Summary</th>
          <td>UTF-16 (LE) byte order mark encoding not supported
          </td>
        </tr>

        <tr>
          <th>Product</th>
          <td>clang
          </td>
        </tr>

        <tr>
          <th>Version</th>
          <td>trunk
          </td>
        </tr>

        <tr>
          <th>Hardware</th>
          <td>PC
          </td>
        </tr>

        <tr>
          <th>OS</th>
          <td>Windows NT
          </td>
        </tr>

        <tr>
          <th>Status</th>
          <td>NEW
          </td>
        </tr>

        <tr>
          <th>Severity</th>
          <td>enhancement
          </td>
        </tr>

        <tr>
          <th>Priority</th>
          <td>P
          </td>
        </tr>

        <tr>
          <th>Component</th>
          <td>C++
          </td>
        </tr>

        <tr>
          <th>Assignee</th>
          <td>unassignedclangbugs@nondot.org
          </td>
        </tr>

        <tr>
          <th>Reporter</th>
          <td>zahira.ammarguellat@intel.com
          </td>
        </tr>

        <tr>
          <th>CC</th>
          <td>dgregor@apple.com, llvm-bugs@lists.llvm.org
          </td>
        </tr></table>
      <p>
        <div>
        <pre>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.</pre>
        </div>
      </p>


      <hr>
      <span>You are receiving this mail because:</span>

      <ul>
          <li>You are on the CC list for the bug.</li>
      </ul>
    </body>
</html>