Character Entity Problem

Ye' old general discussion board. Basically, for everything that isn't covered elsewhere. Come here to shoot the breeze, shoot your mouth off, or whatever suits your fancy.
This forum is not for asking programming related questions.

Moderator: General Moderators

Post Reply
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Character Entity Problem

Post by Benjamin »

Anyone know why

&#146 ;

gets converted to

’

After being saved into a database?

The only PHP function being performed on it is mysql_real_escape_string();

I put a space in there so it wouldn't render it as a ’
timvw
DevNet Master
Posts: 4897
Joined: Mon Jan 19, 2004 11:11 pm
Location: Leuven, Belgium

Post by timvw »

Do you mean that your browser renders the entity? (as in expected behaviour)
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

No ’ is getting spit out in the source when you view the page.
User avatar
Chris Corbyn
Breakbeat Nuttzer
Posts: 13098
Joined: Wed Mar 24, 2004 7:57 am
Location: Melbourne, Australia

Post by Chris Corbyn »

agtlewis wrote:No ’ is getting spit out in the source when you view the page.
What does it look like on the command line using the mySQL client (and perhaps in phpMyAdmin) ?
User avatar
Benjamin
Site Administrator
Posts: 6935
Joined: Sun May 19, 2002 10:24 pm

Post by Benjamin »

It's in the database as ’. It must be a php configuration issue. On my local server it works fine, it's only doing this on the live server.
Post Reply