0

I am trying to display the word Colón as a possible entry in an autocomplete JQuery dialog. Unfortunately, I get Colón instead. I tried to HTML escape it, but it displays Colón.

How can I have this word displayed correctly?

REM: The array entry is defined as following:

v["CR"]="Colón";

Update:

1) The doctype is

<!doctype html>

and I have a

<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">

2) I am using JQuery 1.8.3

3) The list local, or to be correct, in a Javascript file which is loaded with:

<script src='./incl/curr.js' type="text/javascript"></script>

I have performed an extra test and included the word in a pure HTML <h2>. It is displayed correctly.

Jérôme Verstrynge
  • 57,710
  • 92
  • 283
  • 453
  • 1
    I'm not able to duplicate the issue, here's a fiddle showing it working: http://jsfiddle.net/npEHn/1/ – lmortenson Mar 03 '13 at 13:48
  • We really need more information, such as 1) What's the doctype on the document? 2) What version of jquery/jquery ui are you using? 3) Is this autocomplete list local or are you getting it through ajax? – lmortenson Mar 03 '13 at 13:50
  • The fiddle works for me. – Fabian Lauer Mar 03 '13 at 13:51
  • DOCTYPE should be in caps but that doesn't seem to be the cause of your problem. Make sure that your script is saved as UTF-8, like the smartmeta's answer suggests. – lmortenson Mar 03 '13 at 14:08

1 Answers1

2

I assume your text editor uses a different charset. Change it in the editor to UTF-8 then check your words again and ensure that your page is displayed in UTF-8.

smartmeta
  • 1,149
  • 1
  • 17
  • 38
  • I was sure I had saved my js file in UTF-8. I checked with Notepad++ and it was UTF-8 without BOM. I saved it again with pure UTF-8 and now the issue is gone... – Jérôme Verstrynge Mar 03 '13 at 14:45