[cfe-dev] Making Clang support UTF-16 input?
degski via cfe-dev
cfe-dev at lists.llvm.org
Thu Aug 16 20:14:07 PDT 2018
> When trying out the new LLVM Visual Studio integration extension [1]
that now supports VS 2017, we learned that at some point, VS changed
the editor to encode new project files as utf-16 by default [2].
The editor is not doing much in this case, as far as I can see. When
creating a new project VS uses project templates, they contain those files
pch.h and main.cpp pch.cpp etc in UTF-16, it's those templates that have
the problem.
Apparently someones' editor saved them to UTF-16 at some point (15.4),
after which this problem has arisen. If I add a new source file by choosing
add new item from solution explorer it creates an ansi file (with CF/LF
line-endings), not UTF-16 (at least on my machine).
It also seems from the comments on that bug-report being presented as a
feature that not many peops are happy with it. Some comment states:
UTF-16 doesn't work well with most compilers, especially cross platform.
UTF-16 doesn't work well with SVN.
UTF-16 doesn't work well with GIT.
someone else notes clang-tidy would need to change as well.
which seem good enough reasons for MS to me to revert it (i.e. re-save the
files in the templates as ansi files, and problem is gone).
To summarize, I would not change clang.
degski
--
*"If something cannot go on forever, it will stop" - Herbert Stein*
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20180817/54db633c/attachment.html>
More information about the cfe-dev
mailing list