开发者

PHP - display string ISO-8859-2

开发者 https://www.devze.com 2023-03-25 12:04 出处:网络
I have a mysql db - > column (Collation - latin2_general_ci) with this string : Alb complet, cu sticlă albă Satinato cu şlefuire în faţete

I have a mysql db - > column (Collation - latin2_general_ci) with this string : Alb complet, cu sticlă albă Satinato cu şlefuire în faţete When i print the data from db in a php file开发者_如何学运维 i get : Alb complet, cu sticl? alb? Satinato cu ?lefuire în fa?ete

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

Any ideas why and how can i solve this?


meta-tag, database encoding end connection encoding should be same.

Try query

SET NAMES encoding_name

before any query after connection

Old data may be lost, but new one should works correct

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号