Yeah, something like that :-) - but I do get the document property values right. It's just for the strings I create within the script. No luck with @Html.Raw(test) / @Html.Raw("åäö") either I'm afraid.
What happened! How is "Fixed" the solution for this? I get the same issue, the characters are nice in Richtext editor output, but when i do åäö in a script it's bargled like these: ö weird stuff! Any ideas?
I see, if I'm not mistaken the bug was the umbraco code editor saved it badly encoded, can you check the actual saved partial view file, in that case this bug has re-appeared
Hmm, no the partial looks fine! The string has it's correct "åäö" content when shown in WebMatrix as well.
I've tried creating and outputting the string in the template calling the partial, and that works great, åäö looks beautiful, but when done inside the partial it gets messed up.
3. HtmlEncoding does not happen automatically, so Swedish characters like åäö wont display correctly. I also tried HtmlEncoding my String, but that didnt work either (I got "?"'s).
Encoding of characters?
I'm having problems to display non-english characters in my Razor scripts. In a property value there's no problem.
But when I try to add them within my script I need to manually html encode them to get them work:
Returns
To make it work at all I need to
Html.Encode("ö") does not help me either...
Any advice?
This is the disable-output-encoding thing for XSLT all over again right? ;-)
Change it to @Html.Raw(test) and it outputs the raw text, not the Html entities.
Yeah, something like that :-) - but I do get the document property values right. It's just for the strings I create within the script. No luck with @Html.Raw(test) / @Html.Raw("åäö") either I'm afraid.
Shoot, there's definitely something wrong with my upgraded version, in a clean install I do get this problem as well! Seems a bug.
Could it be the culture setting? Maybe try adding a hostname with Swedish language?
Good call, but no luck. Found out it has to do with the scripting editor file encoding http://umbraco.codeplex.com/workitem/30073
lol aah! who uses that thing anyway? ;-)
Hehe - I do, but I understood you wasnt, thats what got me to open it in VS in the first place :)
Fixed :)
Yes, works fine (RC), great!
What happened! How is "Fixed" the solution for this? I get the same issue, the characters are nice in Richtext editor output, but when i do åäö in a script it's bargled like these: ö weird stuff! Any ideas?
Do you get the error in current version of Umbraco?
Yeah, I'm using 6.0.3
This renders:
"Produktbrochyr för"
Or how can I put åäö in manually handled HTML output, otherwise?
Thanks!
With Razor you can write HTML as is and just add the variables within it with the help of @, for example:
@{
// get the data from somewhere
var someUrl = "/somelink";
var someTitle = "some title";
}
<p><a href="@someUrl">Produktbroschyr för @someTitle</a></p>
I just tried entering åäö chars in template editor and in a new macro script in 6.0.3 in the macro editor, and I do not get those errors.
I'm not using a macro script, but a Partial, could that be the difference?
I see, if I'm not mistaken the bug was the umbraco code editor saved it badly encoded, can you check the actual saved partial view file, in that case this bug has re-appeared
Hmm, no the partial looks fine! The string has it's correct "åäö" content when shown in WebMatrix as well.
I've tried creating and outputting the string in the template calling the partial, and that works great, åäö looks beautiful, but when done inside the partial it gets messed up.
It looks like you were on to this earlier in this thread:
http://our.umbraco.org/forum/developers/razor/16034-Razor-@helper-in-Umbraco?p=1
One of your replies contained this:
3. HtmlEncoding does not happen automatically, so Swedish characters like åäö wont display correctly. I also tried HtmlEncoding my String, but that didnt work either (I got "?"'s).
We recently fixed this, will be part of 6.0.4 coming up today: http://issues.umbraco.org/issue/U4-2118
Sweet!
is working on a reply...