Forum Discussion
Marc Roussel
Nov 29, 2021Iron Contributor
I'm having a web app in Blazor Wasm ASP.NET Core server. There seem to be an issue with .NET 6
I have a file encoded in UTF8 thus having French special characters like é, è or ê etc... When I read the file using System.IO.File.ReadAllText(MyPathFileName, Encoding.UTF8) I still get the file...
- Dec 06, 2021Solved. The problem was because the file wasn't saved in UTF8. After saving the file in UTF8 I've been able to use Encoding.UTF8.
Thanx
Nikhilgoel
Dec 06, 2021Copper Contributor
Try using Encoding.GetEncoding("iso-8859-1") instead of Encoding.UTF8 since Encoding.UTF8 does not have ASCII values for extended Latin charcaters
- Marc RousselDec 06, 2021Iron ContributorSolved. The problem was because the file wasn't saved in UTF8. After saving the file in UTF8 I've been able to use Encoding.UTF8.
Thanx