Ask a Question related to Coldfusion - Getting Started, Design and Development.
-
BKBK #1
How do you output the Euro symbol intext/HTML/Javascript?
Inserting the euro symbol causes problems. Some users report that they get
a question mark, others that they get a little square. The problem remains,
even
when we switch from iso-8859-1 to the newer "euro" encoding, iso-8859-15, or
when we use UTF-8. In each case we used a symbol written in an encoding's
own character set, to avoid incompatibility.
Only the Unicode value, \u20AC, seems to work without problems. Can you
suggest other, or better, alternatives? Thanks in advance.
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<title>Euro symbol</title>
<meta http-equiv="content-type" content="text/html; charset=iso-8859-15">
<meta http-equiv="content-style-type" content="text/css" >
<meta http-equiv="content-script-type" content="text/javascript" >
<script language="JavaScript">
var curr = "";
function calculate_rebate(f) {
curr = f.currency.value;
switch (curr){
/* Alternative for Euro symbol = \u20AC. What other alternatives are
there? */
case "eur" : document.rebate_form.rebate.value=" ? 45,50";
break;
case "usd" : document.rebate_form.rebate.value=" $ 61.00";
}
}
</script>
</head>
<body>
<form name="rebate_form" action="#" method="post">
Your currency: <select name="currency">
<option value="eur" selected>Euro</option>
<option value="usd">US Dollar</option>
</select><br><br>
<input type="Button" name="calculator" value="Calculate"
onclick="calculate_rebate(this.form);"><br><br>
Your rebate: <input type="text" name="rebate" size="10" maxlength="10">
</form>
</body>
</html>
BKBK Guest
-
Euro ? symbol for embeded fonts
Hi all, I'm trying to use the Euro sign in an application, to render some data in Labels formatted with a CurrencyFormatter for which I specify '?'... -
HTML won't display ? symbol in drop-down menu list.
What happened?, Can anyone help? I created drop-down selection list of amounts which a client might be willing to pay, however when I view the... -
output text in control location; calling control javascript from page javascript
Hi; If you don't know, I'm just learning javascript and aspnet, but I have a pretty good grounding in windows programming. I'm trying to build a... -
checking for Euro currency symbol in regexp
Hi, I want to check that a string entered via a from contains the only cdertain characters including the Euro currency symbol using a reg exp in... -
Writing Euro symbol with utf encoding
Hello All I am writing a string from the database into a text file which contains "Euro" symbol . I have tried using iconv() and utf_encode and... -
PaulH #2
Re: How do you output the Euro symbol intext/HTML/Javascript?
Just Use Unicode (c). if your users are seeing garbaged text (they see ??) or
have problems rendering text (boxes), that's *your* problem. you need to synch
up your encoding end-to-end as well as make sure you're using a font that can
render that encoding.
this isn't rocket science.
PaulH Guest
-
BKBK #3
Re: How do you output the Euro symbol intext/HTML/Javascript?
>... Just Use Unicode (c). if your users are seeing garbaged text (they see ??)
orsynch>... have problems rendering text (boxes), that's *your* problem. you need toIt is clear I already know I can use Unicode. I'm just asking if anyone has any>... up your encoding end-to-end as well as make sure you're using a font that
>... can render that encoding. this isn't rocket science.
other suggestions. No matter how much you know, you can always pick up
tips from these forums. The only one I see in your message is "you need
to synch up your encoding end-to-end as well ". I don't understand what you
mean by that. Is it a kind of encoding?
BKBK Guest
-
PaulH #4
Re: How do you output the Euro symbol intext/HTML/Javascript?
bkbk, no its not clear that you understand unicode/encoding, otherwise if you
understand unicode why are you asking this kind of question? why bother with
anything else? do you really want to deal w/dozens and dozens of encodings? do
you really want to handle multiple encodings per language? do you know what
"mojibake" is? do you want to go back to living in a cave ;-)
"synch up your encoding end-to-end" means exactly that. pretty much all these
sort of problems boil down to encoding getting out of synch.
PaulH Guest
-
BKBK #5
Re: How do you output the Euro symbol intext/HTML/Javascript?
>... bkbk, no its not clear that you understand unicode/encoding, otherwise
The science to launch a rocket into space is secondary school physics>...if you understand unicode why are you asking this kind of question?
about centrifugal and centripetal forces, whose equations don't take
one-quarter of an A4. The official literature on Unicode runs into several
hundered pages. Even the final text on the Unicode of the Euro symbol
has not yet been written. In any case Unicode is not as trivial or as final
as you seem to suggest.
There are occasions when you have no choice but to do just that.>... do you really want to handle multiple encodings per language?
My understanding of the "synch up", is that one synchs x up with y.>... "synch up your encoding end-to-end" means exactly that.
>... encoding getting out of synch
What your x and y are is not clear. When you say "end-to-end", may I
ask from which end to which end?
A little. Oh, and enough to know you've written on the subject before.>... do you know what "mojibake" is?
No need. I already do. In any case, I still miss a suggestion for>... do you want to go back to living in a cave
an alternative.
BKBK Guest
-
PaulH #6
Re: How do you output the Euro symbol intext/HTML/Javascript?
bkbk, you seem to like to argue just to argue. i've fought all the unicode
battles i'm going to fight around here. just be thankful you have it to use.
i never said unicode is trivial though it's use in your case is. as far as it
being final, it is as far as most of us are concerned. you won't find any
changes being made that easily to the existing "set", even obscure/dead or
obviously wrong things are very tough to get changed. why? because it took
years & years to get to it's current state and folks have been using it for
years & years. if not already, subscribe to the consortium's list & watch the
debates fly. see how much of that goop actually
impinges your life as a developer. when's the last time you had to deal with
Woleai (Caroline Islands script)?
you should be eliminating encodings to make your's & your users's lives
simpler, not encouraging their growth. apps still not unicode enabled are
dinosaurs & should be targeted for fixing ASAP.
db-to-app-to-user and back again should all be the same encoding. that's good
practice. there is no better alternative to using unicode.
PaulH Guest
-
BKBK #7
Re: How do you output the Euro symbol intext/HTML/Javascript?
>... bkbk, you seem to like to argue just to argue.
I urge anyone who reads this to re-read the thread from the beginning,
and show me just one place where I argue just to argue.
Wrong. Clue: 2^16 is a constant! For most people, at least.>... as far as it being final, it is as far as most of us are concerned.
This summarizes your response, so I'll react just to it. Some developers,>... db-to-app-to-user and back again should all be the same encoding.
>... that's good practice. there is no better alternative to using unicode.
work only with proprietary code. Someone else either owns the copyright,
someone else developed it or someone else calls the shots. Much as you
may want to unicode everything, you may only have limited access or
limited control.
In fact, that is the situation I'm facing. There is a comparable, even
bigger problem, not unrelated to encoding. A customer's server that is
running an ancient version of Coldfusion or a client running Windows 95
and Internet Explorer 4. What do you do then? Barge in and change
everything? I cannot identify with your mentality of eliminating
encodings to make your's & your users's lives simpler, not encouraging
their growth. It is not a realistic mentality. Sometimes you can only
make do, do the best you can, with what you have before you.
Doctors now universally recommend unsaturated oils as far healthier than
saturated. You react here like a Doctor who goes about, grabbing people's
burgers, and telling them they are dinosaurs & should be targeted for
fixing ASAP.
To other readers, please let me know if you have an alternative solution
for the Euro symbol. Thanks in advance.
BKBK Guest
-
Unregistered #8
How do you output the Euro symbol intext/HTML/Javascript?
use:
'\u20AC' = € sign in javascriptUnregistered Guest



Reply With Quote

