tags:

views:

70

answers:

2

i have tried to copy euro symbol from Wikipedia...and echo it (in my parent page),at that time it is working.but when i replace the same html content using jquery(used same symbol to echo in the other page).it is not displaying.why is it so..(or is der any way to display the same thing using html)?

+5  A: 

In HTML you do this

€

And of course this works with jQuery, or any other web based language you are using

For more information look here

Chris
Couldn't put it better myself
espais
+1  A: 

You need to ensure that your data is encoded using $X, that your server claims it is encoded using $X, and that any meta tags or xml prologs you may have also claim it is encoded using $X.

... where $X is a character encoding which includes the euro symbol. UTF-8 is recommended.

The W3C have an introduction to character encoding.

You can bypass this using HTML entities (€ in this case), which let you represent characters using ASCII (which is a subset of pretty much any character encoding you care to name). This has the advantage of being easy to type of a keyboard which doesn't have that character, but requires a tiny bit more bandwidth and will make it hard to read the source code of documents which include a lot of non-ASCII characters.

Note that HTML entities will only work when dealing with HTML. You'll find it breaking if you try things such as $(input).val('€').

David Dorward