sql - help to get rid of HTML special chars in database -


i've migrated site interspire cms joomla! cms. i've managed migrate database of articles, of them have weird issue - when access page joomla, title contains html entities ’.

as can guess cms's use, rely on php server side, , mysql database.

i tried go on titles of articles in database htmlspecialchars_decode , html_entity_decode in order rid of those, had no effect.

if grab example db , echo it, ok: what’s pleasure, lasagna or pizza manchester style?

if go article page in joomla this: what’s pleasure, lasagna or pizza manchester style?

when go phpmyadmin see directly in database, contents of title: what’s pleasure, lasagna or pizza manchester style?

i tried remove symbol with:

str_replace("’","",$title); 

or replace this

str_replace('’',"'",$title); 

but nothing. when tried encode again instead of decoding (just see if i'm on right db) worked , encoded again...

please, glad have new ideas... thanks, yanipan

try setting encoding cp1252. worked out me:

$decoded = html_entity_decode($your_string, ent_quotes, 'cp1252');


Comments

Popular posts from this blog

c# - How to set Z index when using WPF DrawingContext? -

razor - Is this a bug in WebMatrix PageData? -

visual c++ - Using relative values in array sorting ( asm ) -