-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Remove UTF-8 BOM #15026
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
Remove UTF-8 BOM #15026
Conversation
|
@RyanUnderhill, it looks like this PR got lost. |
|
I am able to build ort without any error for cuda ep. Would you share the build command and error you're seeing? |
Yep, can you say what compiler version you're using? My guess is GCC based on a quickly online search. I don't see any unicode strings in the file, would be amusing to know how this was added. VC++ only does it if you type unicode into the file, so it might have happened accidentally. |
|
This is the failing command and the begginning of the error list: The snippet is full of internals but I decided not to strip them out. I am unable to reproduce the problem during nixpkgs build, only my local build fails. UTF8-BOM is not in favor any more. |
|
Just confirmed that UTF-8 BOM exists in that file. I think it is reasonable to remove it from this source file. @RyanUnderhill let me know if you have any concerns. |
|
/azp run Linux CPU CI Pipeline, Linux CPU Minimal Build E2E CI Pipeline, Linux GPU CI Pipeline, Linux GPU TensorRT CI Pipeline, Linux OpenVINO CI Pipeline, MacOS CI Pipeline, ONNX Runtime Web CI Pipeline, onnxruntime-binary-size-checks-ci-pipeline, Linux QNN CI Pipeline |
|
/azp run Windows CPU CI Pipeline, Windows GPU CI Pipeline, Windows GPU TensorRT CI Pipeline, orttraining-linux-ci-pipeline, orttraining-linux-gpu-ci-pipeline, orttraining-ortmodule-distributed, onnxruntime-python-checks-ci-pipeline, ONNX Runtime React Native CI Pipeline, Windows ARM64 QNN CI Pipeline |
|
Azure Pipelines successfully started running 9 pipeline(s). |
|
Azure Pipelines successfully started running 8 pipeline(s). |
|
My two cents:
However, most OSS projects chose to do nothing and many of them are only compliable in English UTF-8 environments. That's not a good thing. I do not against this change. But I want to raise the awareness that if you do nothing about it, by default the source files will be compiled based the current user's locale setting, and on Windows usually it's wrong because it would not be "UTF-8". |
At the time the code can not be compiled by NVCC.