I’ve been working on a C++ based project for quite some time on Windows, but I wanted to see how the project runs on my Macbook.
After checking out the code, I couldn’t compile through the editor so I generated Xcode project files. However, when compiling through Xcode, I am hit with the following error affecting most of the source files including the “.generated” files: “UTF-16 (LE) byte order mark detected in … FILENAME HERE”.
I attempted to change text format but this error just won’t go away. Has anyone else encountered this? I get these errors even when creating a new C++ based project in the Epic Launcher. If it helps, it’s the “#include” lines the errors are located.
I’ve the same issue. Changing encoding in xcode 9 doesn’t help. However, I got it working by converting all the generated class and header files (using sublime 3, should be the same with other text editors ) from UTF16 to UTF-8 and it works.
I solved this problem in a similar way but using vscode for Mac; saving as encoding: UTF-8 without BOM, and only for the file that caused the error rather than all generated files.