The following string is defined in a json.js file.
var test = "One complimentary entrée with the purchase of an entrée.";
It is included in an index.html file by
When the string is displayed in UI, it shows up as
"One complimentary entr�e with the purchase of an entr�e."
But if string is defined directly in the index.html, then it is not a problem.
Can anyone suggest a solution on how to keep the text in the separate .js file?
Make sure that the included file is saved using the same encoding as the page.
If for example the page is saved as UTF-8, the included file will also be loaded as UTF-8.
Escape the non-Latin character to an HTML entity, é or change all aspects your development system and code editors to parse all text characters as UTF8.