I'm building a Blazor Web app (wasm). I use ToString("C") to display values as a currency, however the dollar sign is showing up as ¤, for example ¤4.83 instead of $4.83. According to Wikipedia "The currency sign ¤ is a character used to denote an unspecified currency"
This seems like a localization issue, but my browser / Blazor is not detecting that I'm en-US and showing the $ sign. How can I show the correct currency symbol?
I'm currently using .Net 5, but this problem exists on .Net core 3.x as well.
Add this to startup. I only saw this behaviour when I switched to (WSL 2)
CultureInfo.DefaultThreadCurrentCulture = new CultureInfo("en-US");
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With