The goal
Fix the accentuation within <text> tag of Razor Engine.
The problem
I'm brazilian and in our country there are too much accentuation. Apple in our language means "Maçã", and as you can see, there is two accents/special characters.
The follow syntax is written in JavaScript and the application uses Razor Engine for templating.
var products = [];
@foreach (var product in Model)
{
<text>
products.push(new Product
("@product.productId",
"@product.productName",
"@product.thumbnailUrl",
"@product.originalProductPrice",
"@product.promotionalProductPrice",
"@product.measureName",
"@product.measureAbbreviation",
"@product.marketName",
"@product.numberOfMarketsThatHaveThisProduct",
"@product.productState")
);
</text>
}
As you could see, there is Razor within JavaScript and JavaScript within Razor.
One result of this loop is Maçã and when I display it within <text> tag, the result is: "Maçã".
I really do not know the problem nor how to solve and need your help. Any ideas?