?
Solved

Euro character in javascript??

Posted on 2004-08-12
5
Medium Priority
?
5,674 Views
Last Modified: 2013-12-03
I been looin to find the euro symbol hex code for javascript all day. I dont mean the € html code.

I am using and have to use

charset=iso-8859-1

i find the pound character as '\xA3'
Does anybody knoe the euro character hex representation in javascript using this character set?
0
Comment
Question by:joedutch
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
5 Comments
 
LVL 7

Accepted Solution

by:
suramsureshbabu earned 500 total points
ID: 11790434
The Euro
The Euro Sign in HTML and Javascript
Standards require that the Euro is represented either as € or with its unicode number, as either € or € (tests : ?, ? and ? in your browser. In my MS IE4, only € is recognised).

In javascript strings, \u20AC can be used for the Euro character (test : ?
in your browser).

The Euro character is more reliably present in the simpler, more common text fonts than on older, rarer, or obscurer ones.
On Various Systems
In HTML, Dollar is represented by "$", but Pound by "£" or "£". I have not read of a corresponding small number for the Euro, but the deprecated "€" does work in my MSIE4, giving "?" - font permitting; I've since read of "€", the proper standard, giving "?". Numerically, 8364 = $20AC; see below;

HTML :- &#163; &pound; &#128; &#8364; &euro; <strike>C</strike>
You get :- £ £ ? ? ? C
Win98 Ed1
MSIE 4, local OK OK OK OK &euro; would serve

Also, "&euro;" should work - eventually. I hear that all work in Mozilla 1.1.

It may be that Hex can be used, so that Pound would use 00A3; but I cannot find a Hex form acceptable to MSIE 4.
0
 
LVL 7

Expert Comment

by:suramsureshbabu
ID: 11790437
0
 
LVL 5

Assisted Solution

by:vilia
vilia earned 500 total points
ID: 11812324
> euro symbol hex code

euroUnicode = 8364;
String.fromCharCode(euroUnicode)

please view an example:
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
&lt;html&gt;
      <head>
      <script language="javascript">
      function showEuro() {
            euroUnicode = 8364;
            
            s = '';
            s += '<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">\n';
            s += '<html>\n';
            s += '      <head>\n';
            s += '            <meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1">\n';
            s += '      </head>\n';
            s += '      <body>\n';
            s += '            euroCode[' + euroUnicode +']=\"' + String.fromCharCode(euroUnicode) + '\"\n';
            s += '      </body>\n';
            s += '</html>\n'
            popUp = window.open("");
            popUp.document.write(s);
            popUp.document.close();      
      }
      
      showEuro();
      </script>
      </head>
      <body>
      </body>
&lt;/html&gt;
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This article discusses the difference between strict equality operator and equality operator in JavaScript. The Need: Because JavaScript performs an implicit type conversion when performing comparisons, we have to take this into account when wri…
Ever visit a website where you spotted a really cool looking Font, yet couldn't figure out which font family it belonged to, or how to get a copy of it for your own use? This article explains the process of doing exactly that, as well as showing how…
The viewer will learn the basics of jQuery, including how to invoke it on a web page. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery.: (CODE)
Excel styles will make formatting consistent and let you apply and change formatting faster. In this tutorial, you'll learn how to use Excel's built-in styles, how to modify styles, and how to create your own. You'll also learn how to use your custo…
Suggested Courses

765 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question