/    Sign up×
Community /Pin to ProfileBookmark

strange encoding problem – please help

Hello

I have a strange problem, i have a webpage which has problems showing £ pound signs in internet explorer but not in firefox

it replaces the pound sign with a ?

i cant work this out, its the same page

please look

[url]http://www.miniventure.co.uk/prices2.php[/url]

if this help, what u dont see, it that the test it being grabed from a mysql table, using php

but why different between ie and firefox, is it a css thing

to post a comment
HTML

8 Comments(s)

Copy linkTweet thisAlerts:
@haggoauthorJan 24.2007 — <?Php

$strUserName = "????????";

$strPassword = "???????";

$strServerName = "localhost";

$strDataBaseName = "??????";

$Server_Connection = Mysql_Connect($strServerName, $strUserName,$strPassword)


or Die("Error #1 - Can not connect to the database.");

$Database_Connection = Mysql_Select_Db($strDataBaseName, $Server_Connection)


Or Die("Error #2 - Can connect to database but can not select database");


Function GrabPageInfo($strPage,$strItem)

{

$Sql_Info = Mysql_Query("SELECT * FROM Pages Where Page_Ref = '$strPage' and Item_Name = '$strItem';",$GLOBALS['Server_Connection'])
Or Die("Error #Menu0121");

While ($strInfo = Mysql_Fetch_Array($Sql_Info))
{
echo $strInfo[Html_Code];
}

}

?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1;" />

<?Php

include("con2.php");

Echo GrabPageInfo("PRICES","MAIN_TEXT");

?>
Copy linkTweet thisAlerts:
@CharlesJan 24.2007 — You've got bigger problems than that. Your page is an oleo of HTML and XHTML. And What's up with the byte order mark at the very beginning of the page?
Copy linkTweet thisAlerts:
@haggoauthorJan 24.2007 — i have had this code working many other places on the same host, no problem, i conpared that, matched the database up, completey, such as table strurture, and encoding langs, same in, same host

i can not find the difference, any see it ?
Copy linkTweet thisAlerts:
@haggoauthorJan 24.2007 — whats oleo means, i have no idea about the byte mark, that is the whole code, lol
Copy linkTweet thisAlerts:
@CharlesJan 24.2007 — Start by correcting these errors http://validator.w3.org/check?verbose=1&uri=http%3A%2F%2Fwww.miniventure.co.uk%2Fprices2.php . Then try using CSS to specify a font-family that supports that character.
Copy linkTweet thisAlerts:
@haggoauthorJan 24.2007 — I tryed some more code and the problem seemed to be, when the html code was being grabed from the mysql table

but then i made

http://www.miniventure.co.uk/prices3.php

which code is

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">

<head>

<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />

<title>Untitled Document</title>

</head>

<body>

? £

</body>

</html>



simple, eh

now in firefox, appears very wrong and IE works

eh?
Copy linkTweet thisAlerts:
@CharlesJan 24.2007 — Try using "&pound;". If that doesn't work then follow my instructions above. Correct the errors and specify a font that contains the character.
Copy linkTweet thisAlerts:
@haggoauthorJan 24.2007 — thanks, i made the content editor, do a find and replace on £ for &pound; works fine now, your a life saver
×

Success!

Help @haggo spread the word by sharing this article on Twitter...

Tweet This
Sign in
Forgot password?
Sign in with TwitchSign in with GithubCreate Account
about: ({
version: 0.1.9 BETA 6.17,
whats_new: community page,
up_next: more Davinci•003 tasks,
coming_soon: events calendar,
social: @webDeveloperHQ
});

legal: ({
terms: of use,
privacy: policy
});
changelog: (
version: 0.1.9,
notes: added community page

version: 0.1.8,
notes: added Davinci•003

version: 0.1.7,
notes: upvote answers to bounties

version: 0.1.6,
notes: article editor refresh
)...
recent_tips: (
tipper: @nearjob,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,

tipper: @meenaratha,
tipped: article
amount: 1000 SATS,
)...