Details
-
Suggestion
-
Resolution: Unresolved
-
Not Evaluated
-
None
-
None
Description
A customer reported this:
Since my Windows is Korean language, MSVC tries to decode all source code in CP949 but some source codes from gn and chromium contains non-ASCII characters and they are obviously encoded in UTF-8. This can be easily fixed by adding '/utf-8' flag when compiling.
Would it make sense to set CMAKE_CXX_FLAGS="/utf-8" and CMAKE_C_FLAGS="/utf-8" automatically for MSVC builds? (see https://stackoverflow.com/questions/47690822/possible-to-force-cmake-msvc-to-use-utf-8-encoding-for-source-files-without-a-bo )
Also, https://github.com/qt/qtwebengine-chromium/blob/772cb04f511b9a1b98a4e155ed62efdfd971e5fb/chromium/tools/idl_parser/idl_parser.py#L1318 raises an invalid byte sequence error when the wrong encoding is assumed. (To be patched upstream?)
- with open(filename) as fileobject: + with open(filename, encoding="utf-8") as fileobject:
Attachments
Issue Links
- relates to
-
QTBUG-121722 headersclean does not pass the /utf-8 compiler flag by default for MSVC
-
- Closed
-