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

build: set /utf-8 flag when using MSVC #4975

Merged
merged 1 commit into from Feb 22, 2023
Merged

Commits on Feb 22, 2023

  1. build: set /utf-8 flag when using MSVC

    MSVC by default decodes source files in the current Windows code page if
    they don't have a Unicode BOM, and also encodes strings and chars into
    the current code page before storing them into the compiled binary. Our
    files are always encoded in UTF-8, and our code always assumes runtime
    strings are encoded in UTF-8, so we should pass the `/utf-8` flag to
    MSVC.
    
    Microsoft Docs:
    https://learn.microsoft.com/en-us/cpp/build/reference/utf-8-set-source-and-executable-character-sets-to-utf-8
    fghzxm authored and ckerr committed Feb 22, 2023
    Configuration menu
    Copy the full SHA
    d433866 View commit details
    Browse the repository at this point in the history