robertnovak
robertnovak

Reputation: 29

Decode in UTF8 from mysql

I'm from Czech republic and I have a problem with decode, I imported the product database to MYSQL, the products names is stored in a database using code ( probably UTF-8) . In php I used html_entity_decode() to decode, but is problably wrong coding. Anyone have idea? Thank you. For examples:

112 111 109 101 114 97 110 269 101 32 115 237 116.... -> "pomeran e sít 1k"

instead of

"pomeranče síť 1k"

and

80 114 97 382 115 107 225 32 48 46 53 108 -> Pra~ská 0.5

instead of

"Pražská 0.5"

Upvotes: 0

Views: 419

Answers (1)

devpro
devpro

Reputation: 16117

After MYSQL connection you must need to select MYSQL charset function as like:

$link = mysql_connect('localhost', 'user', 'password');
mysql_set_charset('utf8',$link); // you need this

Upvotes: 0

Related Questions