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.ps1] ensure the compiler is using UTF-8 #76570

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

stevapple
Copy link
Contributor

I am (again) proposing to add this flag because anyone who's not using 65001 code page could meet unexpected situations without it. Although it should have no effect with code page 65001 or clang-cl, I added a conditional check to eliminate the flag when unncessary.

@compnerd
Copy link
Member

Do we have a guarantee that the code is stored in UTF-8 encoding? If we can get that put into .gitattributes as the guaranteed encoding, I don't think that this should be too big of a deal. Without the attributes, this could mis-parse the code.

@stevapple
Copy link
Contributor Author

AFAIK all the current dependencies were encoded in UTF-8. Given the nature that Git only supports ASCII’s supersets without explicit working-tree-encoding in .gitattributes, I don’t think there’s any reason to do that for C/C++ source files.

BTW clang-cl.exe is implicitly /utf-8 and doesn’t care about code pages. If a source library supports clang-cl, it should not be in other encodings. Allowing other encoding could cause unnecessary confusion.

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.

2 participants