I have this form dropdown thats populated by a JS file. One of the options in my dropdown has the character ñ, but instead of the showing the letter it shows this: �.
How can I get the form to show the letter ñ? (something like an ascii code but for JS?)
thanks in advance...
First of all, fixing the encoding of the page (to UTF-8, preferably with <meta http-equiv="content-type" content="text/html; charset=utf-8"/>
directly after <head>
) and making sure your editor is set to UTF-8 is generally a very good idea.
Otherwise, replacing ñ with \u00f1
(in JavaScript code, not HTML) is the way to go.
If the JavaScript gets the ñ from an HTML or XML document, you can also use ñ
or ñ
there.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With