There’s a common problem in Javascript when displaying non-English characters like tildes. Even though the charset of the document in which the javascript is located is set as UTF-8, tildes in javascript alerts will be displayed with weird characters instead.
I cannot use the intuitive HTML entities to fix this. For instance: á for á. The most spread solution I’ve found on the Net is to use their corresponding Unicode characters, for instance u00e1 for á. But this is not intuitive at all. Each special character has an apparently random hexadecimal character assigned and it’s harder to have in mind than the HTML entities. Moreover I don’t think this is a fine solution.
So, is there a better way to work around this problem?