-
Notifications
You must be signed in to change notification settings - Fork 10.3k
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
Asp.net core .cs file encoding is not uft-8 encoded #37201
Comments
I just re-read the issue, and it's specifically talking about .cs files in the project template that we haven't done any work on. While I agree this is a gap, this isn't a regression and I'm going to punt this to 7.0. Fixing it for ASP.NET Core's projects might not be sufficient here since this affects other non-ASP.NET Core templates and scaffolding. |
Docs & infra candidate? We'll need to update our pipelines / git configs to enforce UTF8 encoding for committed files. |
The plan here is to follow up with @DamianEdwards and make sure that all files (including |
What's my involvement here? |
We need to validate this to confirm this is still the case and if not, close this. Otherwise, this will indeed be a good infra candidate. |
Thanks for contacting us. We're moving this issue to the |
We've moved this issue to the Backlog milestone. This means that it is not going to be worked on for the coming release. We will reassess the backlog following the current release and consider this item at that time. To learn more about our issue management process and to have better expectation regarding different types of issues you can read our Triage Process. |
Hi. Thanks for contacting us. |
Hi. I just found this after struggling for days with a docker container that just was impossible to have a Razor page show correct characters! |
This issue has been moved from a ticket on Developer Community.
[severity:It's more difficult to complete my work]
When creating a new razor file, the cshtml file gets UTF-8 encoded but the .cs file is ANSI encoded.
This happens if you are using a swedish windows operations system with latest VS2019.
It is very easy to reproduce.
It might sound like a small issue but it's not.
When developing code to run on AKS, the file encoding is extreamly important.
Lets say you have a file with a comment containing. UTF-8 charaters. It will compile fine on you local machine, all tests will pass, but when you check in your code and compile it on a Linux machine, it will fail.
For every file you add you need to manually change it's encoding to UTF-8. Please fix this asap.
Please don't ask me for more information. This is 100% reproducable.
Original Comments
Feedback Bot on 5/16/2021, 08:12 PM:
We have directed your feedback to the appropriate engineering team for further evaluation. The team will review the feedback and notify you about the next steps.
Jiahui Zhang (Beyondsoft Corporation) [MSFT] on 5/25/2021, 00:12 AM:
Thank you for your feedback! We tried to reproduce this issue with following steps:
The Encoding shows “Western European (Windows)” instead of “Unicode(UTF-8 with signature)”.
Is it the behavior of this issue? If yes, we will go through a further investigation. If not, could you help to correct us?
We are looking forward to your reply!
per.bornsjo on 5/25/2021, 00:27 AM:
Yes, that’s the problem!
Both the .cs and the .cshtml should be UTF-8.
Feedback Bot on 6/2/2021, 02:38 AM:
This issue is currently being investigated. Our team will get back to you if either more information is needed, a workaround is available, or the issue is resolved.
Original Solutions
(no solutions)
The text was updated successfully, but these errors were encountered: