-
Notifications
You must be signed in to change notification settings - Fork 7.4k
Help with file encoding #415
Description
Hello, I wrote a port for little cms and the devil library. I am close to send the PR but there is some issues with file encoding and I have a lot of warnings during compilation like:
warning C4828: The file contains a character starting at offset 0x248 that is illegal in the current source character set (codepage 65001)
It translates into an error in the case of devil:
line: IL_TEXT("format non supporté"),
error: 1>C:\Sources\Team Services\vcpkg\buildtrees\devil\src\devIL\DevIL\src-ILU\include\ilu_error/ilu_err-french.h(22): error C2059: syntax error: ')'
1>C:\Sources\Team Services\vcpkg\buildtrees\devil\src\devIL\DevIL\src-ILU\include\ilu_error/ilu_err-french.h(22): error C2061: syntax error: identifier 'eund'
This does not happen if the solution is generated from CMake.
Is there something to do related to file encoding ?
Edit:
removing /utf-8 from the c flags seems to fix it.
list(APPEND _csc_OPTIONS
"-DCMAKE_CXX_FLAGS= /DWIN32 /D_WINDOWS /W3 /utf-8 /GR /EHsc"
"-DCMAKE_C_FLAGS= /DWIN32 /D_WINDOWS /W3"# /utf-8"
"-DCMAKE_EXPORT_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_PACKAGE_REGISTRY=ON"
"-DCMAKE_FIND_PACKAGE_NO_SYSTEM_PACKAGE_REGISTRY=ON"
)
Regards,
Axel.