Problem with character €

Hello,

I’ve got a problem with character €.

I’ve got a form wich is accessed by web, where there is a text field.

User writes something in this field and when he submits form, there is a javascript method which test if there is a character € in the text of the field.

function test(v) {

if(v.indexOf(“€”)>-1) {

return true;

}

}

But method doesn’t work. It doesn’t find € in the text even if there is.

And if I display source code, I see that € is replaced by &#8364 ; in the method javascript.

So :

function test(v) {

if(v.indexOf(“&#8364 ;”)>-1) {

return true;

}

}

If I display the value of v by an alert(v), there is the symbol €. It isn’t replaced.

Charset is ISO-8859-1.

It worked in R5 (symbol € wasn’t replaced by &#8364 :wink: but in R7, it doesn’t seem to work.

Anybody can help me ?

Note : Actually, there is no space between “&#8364” and “;”, but then your browser will display €.

Subject: Problem with character €

Is the field in question a RichText field?That may explain some things and it would probably have to do with the MIME settings of the field.

But, is this really a problem?

If you submit the form, will it not show up correctly when in read mode in the browser and in the Notes client?

Do the users ever see anything else than “€”?

If it does, all you need is to make sure your JS code checks for both “€” and “&#8364 ;”.

Subject: RE: Problem with character €

No it isn’t a richtext field. It’s a simple text field.

But the problem isn’t in the value of the text field, it is on the javascript method.

I explain :

For example, user writes in the text field “20€”

If I display the value of the text field by an alert() in my javascript method, I see “20€”. It isn’t replaced by “&#8364 ;”.

The problem is in the javascript method, if I display the source code of the page, I see that the character “€” in my method became “&#8364 ;”.

So, method search “&#8364 ;” in the text and of course it doesn’t find.

I don’t know why Domino doesn’t replace “€” by “&#8364 ;” in my javascript method.

So, I can’t manage to check for both “€” and “&#8364 ;” because I don’t manage to check for “€”.