I have an MVC 4 application that I'm localizing. All the built-in resourcing and Model attributed content is appearing fine, but where I localized content written for JQuery the encoding appears wrong. Here is an example of how things render, note the red boxes... they should be the same word.
The problem appears to revolve around the below line of code in my View:
$("#FirstName").Watermark("@Resources.ApplicantGivenNameWatermark");
This JQuery essentially takes in a string and then writes it to the input when no other value has been supplied. Here is an abstract of that code:
$.fn.Watermark = function (text) {
return this.each(
function () {
var input = $(this);
map[map.length] = { text: text, obj: input };
//Similar removal process lies here, this one also removes the style
function insertMessage() {
if (input.val().length == 0 || input.val() == text) {
input.val(text);
input.addClass("watermark");
} else
input.removeClass("watermark")
}
input.focus(clearMessage);
input.blur(insertMessage);
input.change(insertMessage);
insertMessage();
}
);
};
Any ideas on how to resolve this would be appreciated. As a side note, I've been able to reliably recreate this in a wide range of browsers.