Hello,
I have noticed when i put a £ sign in it turns out to be a A when i look at my website in firefox. Do you know the reason why this is happening?
Thanks
Hello,
I have noticed when i put a £ sign in it turns out to be a A when i look at my website in firefox. Do you know the reason why this is happening?
Thanks
it sounds like you've got a page encoded in UTF-8, but being displayed as Latin-1 - make sure the meta tags and/or server headers tell browser what encoding the page uses.
In an XHTML file, you need to declare the encoding in the initial XML tag, and for maximum compatibility, include a meta tag also
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="application/xhtml+xml; charset=UTF-8" />
...
</head>
Bobince suggests in a comment that for maximum backwards compatibility you do something like this
<?xml version="1.0"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en">
<head>
<meta http-equiv="content-type" content="text/html; charset=UTF-8" />
...
</head>
If you're curious why you get strange letters, here's the likely explanation...