Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix some msvc compile error under Chinese Windows system. #5583

Closed
wants to merge 1 commit into from

Conversation

ShenRen
Copy link

@ShenRen ShenRen commented Dec 25, 2020

Due to the Chinese system compiler default GBK coding, so several string values in the code will cause compiler coding errors, which will stop the compilation.

@lukasmatena
Copy link
Collaborator

I don't like the idea of changing the used characters just to make a compiler happy. Can't you force the source encoding to UTF-8? Newer MSVC compilers allow that, don't they?

@yajiedesign
Copy link

You don't need to change it like this. Just add some code to CMakeLists to start utf8 mode of MSVC

add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

@ShenRen
Copy link
Author

ShenRen commented Dec 28, 2020

You don't need to change it like this. Just add some code to CMakeLists to start utf8 mode of MSVC

add_compile_options("$<$<C_COMPILER_ID:MSVC>:/utf-8>")
add_compile_options("$<$<CXX_COMPILER_ID:MSVC>:/utf-8>")

I will try this, hahah.

@scott0122
Copy link
Contributor

@ShenRen Change your system locale to English(United States)

image

bubnikv added a commit that referenced this pull request Feb 10, 2021
Hopefully a fix of fix some msvc compile error under Chinese Windows system. #5583
Hopefully it will not break any localization.
@bubnikv
Copy link
Collaborator

bubnikv commented Feb 10, 2021

Hopefully fixed with 32b8a59

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants