admin管理员组文章数量:1326641
i have some problem encoding. I m making a plugin and in my table i have insert some words with the "é' but the result of display is �.
My tables are utf8_general_ci, in wp config the encoding is utf8. I tried also to comment define('DB_CHARSET', 'utf8mb4'); define( 'DB_COLLATE', '' );
But nothing is working. How can i do?
This is the request
global $wpdb;
$resu = $wpdb->get_results('
SELECT '.$wpdb->prefix.'mic_combinaisons.id, '.$wpdb->prefix.'mic_keyword.keyword, '.$wpdb->prefix.'mic_secteurs.libelle
FROM '.$wpdb->prefix.'mic_combinaisons
INNER JOIN '.$wpdb->prefix.'mic_keyword ON '.$wpdb->prefix.'mic_keyword.id = '.$wpdb->prefix.'mic_combinaisons.id_keyword
INNER JOIN '.$wpdb->prefix.'mic_secteurs ON '.$wpdb->prefix.'mic_secteurs.id_secteurs = '.$wpdb->prefix.'mic_combinaisons.id_secteur', OBJECT
);
and i try to display like
foreach ( $resu as $res ) {
$id = $res->id;
$keyword = strtolower(str_replace(" ","-",$res->keyword));
$secteur = strtolower(str_replace(" ","-",$res->libelle));
$mic_slug = normalize($keyword) ."-".normalize($secteur)."-k".$id;
echo($mic_slug);
本文标签: pluginsWordpress not encoding quot233quot
版权声明:本文标题:plugins - Wordpress not encoding "é" 内容由网友自发贡献,该文观点仅代表作者本人, 转载请联系作者并注明出处:http://www.betaflare.com/web/1742208248a2433220.html, 本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容,一经查实,本站将立刻删除。
发表评论