Umlauts rendered incorrectly inside html attributes
Hello,
I have problems with encoding umlauts inside umbraco views when rendering them inside html attributes. All is okay when symbols are strings inside view. But when they are output from code (@) they don't render correctly. So outputing some German characters results to html/unicode encoded symbols. Standart Html.Raw, new HtmlString solutions doesn't help. I have tried to specify culture in web.config in umbraco admin to "de" - without any success. I have tried to recreate view inside MS Visual Studio and copied original content to check possible incorrect file encoding - without any success. So here is fragment of view:
results are form Chrome-view source.
Markup is inside razor masterpage cshtml (but could be inside cshtml of view itself it doesn't metter).
Please also note that
Umlauts rendered incorrectly inside html attributes
Hello,
I have problems with encoding umlauts inside umbraco views when rendering them inside html attributes. All is okay when symbols are strings inside view. But when they are output from code (@) they don't render correctly. So outputing some German characters results to html/unicode encoded symbols. Standart Html.Raw, new HtmlString solutions doesn't help. I have tried to specify culture in web.config in umbraco admin to "de" - without any success. I have tried to recreate view inside MS Visual Studio and copied original content to check possible incorrect file encoding - without any success. So here is fragment of view:
this results in:
The only solution that really works but is very ugly is:
I am using Umbraco version 7.2.1 assembly: 1.0.5462.37503
Hi,
Try this :
But it's not problem of Umbraco ) It's just razor.
Thanks
Hello,
Strange because in Razor Html.Raw is enough. And it doesn't helps also (accidentally marked as solution and could not unmark):
results:
From where will you get this data ?
Hello,
results are form Chrome-view source. Markup is inside razor masterpage cshtml (but could be inside cshtml of view itself it doesn't metter). Please also note that
inside regular MVC project produces correct:
is working on a reply...