tags:

views:

78

answers:

3

I have a problem with the £ sign. When the page is loaded it adds an additional character and appears like this: £, I want to write Jquery from which I can replace this character with £ for the entire page.

I am using the utf-8 charset, so that's not where the problem is.

+1  A: 

My suggestion is that you should double check the encoding.

Using UTF-8 as a character encoding does not ensure by itself things are right.

For example, sending UTF-8 which is then decoded as if it were ISO-8859-15 would explain such a problem.

Verify all the data sources, you might have one in an unexpected encoding. I agree with cms, do not use text replace to delete this, fix the problem at its source.

You can play with iconv to see how your data looks when converted from and to different encodings.

UPDATE: I see your page perfectly, so maybe it's your browser decoding the characters wrongly, check the character encoding settings on your browser

Vinko Vrsalovic
Thanks for your reply! I have checked the encoding for page, please see below link http://www.kaptest.co.uk/courses/usa-undergraduate/sat/live/sat-classroom.aspx as a example you can find £ on the page and suggest me what should I do to fix the issue.
MKS
can I have Jquery Code to replace it?
MKS
No, you can't have a Pony!
Vinko Vrsalovic
The page is being served as UTF-8, and is interpreted as such in my Firefox. Switching local encofing to ISO-Latin doubles the fun, so the raw binary is clearly UTF-encoded. It looks like at some point an ISO-Latin to UTF-8 translation is being run over data that is already UTF-8.
Steve Gilham
@Steve. But do you see the incorrect rendering of the pound sign in FF? I cannot reproduce the problem.
Vinko Vrsalovic
+2  A: 

To me, looks like a UTF-8 character being shown in an ISO-8859-1 charset.

I wouldn't recommend you to do text replacements on your page, since all the text nodes have to be traversed and inspected.

I recommend you to re check your encoding, and maybe you could use '£' rather than '£'.

CMS
Thanks for your reply! I have already used £ in my html, it is performing same, please see my comments above
MKS
I am using trdion CMS to publish my page.
MKS
Is it possible that the CMS is sending a http header which is setting the encoding?
Tom
Can I have JQuery to replace £ with £ on whole page
MKS
A: 

Hi,

I have resolved this issue with web.config

I have add below entry in my web.config

<globalization requestEncoding="utf-8" responseEncoding="utf-8" fileEncoding="utf-8" culture="en-GB"  uiCulture ="en-GB" />

Cheers!

Thanks for your support

MKS