-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Roslyn failed to build itself under system codepage 936 #5413
Comments
Tagging @jaredpar who has looked at some encoding issues before. |
Thanks for reporting. This is a duplicate of #4264. This has already been fixed and will be included in update 1. In the mean time you can work around this by adding the following entry int your vbproj file: <CodePage>936</CodePage> This will override the encoding detection logic to prefer this encoding instead of the standard fall back mechanisms. |
@jaredpar No, I don't think this is duplicate. I was compiling Roslyn. The cibuild.cmd bootstrap itself then use the new compiler to compile Roslyn, if it's fixed then this won't happen. The issue you referred was about building files with encoding X under system code page X, while this issue is about building files with encoding X under system code page Y. Unfortunately there's no reasonable fix for a compiler if the files were from external project but to fix the external project source file, but fortunately & interestingly the files are from Roslyn itself, so the fix would be fix that "external" project source file which is from the Roslyn itself. Converting the file encoding into UTF-8 is the correct way, which is what my PR #5415 is doing. |
@jaredpar I didn't explain the issue well earlier, apology for that. |
I was building Roslyn with cibuild.cmd, this error happened when the bootstrapped compiler compiles a test project
My system locale is Simplified Chinese/CodePage936/GB2312, from cmd invoke cibuild.cmd failed to build the following file:
When I used NotePad++ to open this file, I saw
Then I changed encoding to UTF-8 Without BOM
When I use some Charset from European the content looks correct.
The text was updated successfully, but these errors were encountered: