xcode 检测到 UTF-16 (LE) 字节顺序标记
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/32415229/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
UTF-16 (LE) byte order mark detected
提问by Yuma Yanagisawa
I got the following error when I've made a Mac App.
制作 Mac 应用程序时出现以下错误。
UTF-16 (LE) byte order mark detected in '/Users/yanagisawa_yuma/Documents/oF/of_v0.8.4_osx_release/apps/myApps/ArtHackSound/src/ofApp.cpp', but encoding is not supported
在“/Users/yanagisawa_yuma/Documents/oF/of_v0.8.4_osx_release/apps/myApps/ArtHackSound/src/ofApp.cpp”中检测到 UTF-16 (LE) 字节顺序标记,但不支持编码
Obviously, this is related to encoding issues, but I do not understand how to fix it.
显然,这与编码问题有关,但我不明白如何解决。
回答by Kakashi
@raven is right. But you maybe not modify it right at first time.
@raven 是对的。但是你可能第一次没有修改它。
finally,choose UTF-8 ,and convert
最后,选择 UTF-8 并转换
回答by irsis
I was facing the same problem in Mac. I installed the dos2unixutility and just converted the file. It fixed the problem.
我在 Mac 中遇到了同样的问题。我安装了dos2unix实用程序并刚刚转换了文件。它解决了这个问题。
neo-mac:random_experiments$ dos2unix graph/FindIsland.cpp
dos2unix: converting UTF-16LE file graph/FindIsland.cpp to UTF-8 Unix format...
回答by raven
Try to modify Test Encoding to Unicode(UTF-8)
尝试将测试编码修改为 Unicode(UTF-8)