doufu6423 2013-10-21 08:31
浏览 49
已采纳

Wordpress西里尔语编码

So i created a wordpress theme and the cyrillic characters in my .php files are not displayed correctly (for example front-page.php). I tried to change my php.ini file as following:

;default_charset = "UTF8"
;mssql.charset = "UTF8"

and the charset in the header.php:

<meta charset="<?php bloginfo( 'charset' ); ?>">

//which should return utf8 as written in wordpress codex.

But it didnt work. I created another file index1.php in my theme directory. And when i preview it the text in cyrillic is shown properly. And I think that the problem is with Wordpress (because otherwise everything is fine). My WP database is with utf8_general_ci. I am using wamp, localhost, Wordpress - 3.6.1

Thank you in advance!

  • 写回答

2条回答 默认 最新

  • duan20145 2013-10-21 08:37
    关注

    Try create .htaccess in root with content:

    AddDefaultCharset utf-8
    

    and check, please, encoding of your template files, maybe you creates template in other encoding, not utf-8.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
查看更多回答(1条)

报告相同问题?

悬赏问题

  • ¥15 如何用Labview在myRIO上做LCD显示?(语言-开发语言)
  • ¥15 Vue3地图和异步函数使用
  • ¥15 C++ yoloV5改写遇到的问题
  • ¥20 win11修改中文用户名路径
  • ¥15 win2012磁盘空间不足,c盘正常,d盘无法写入
  • ¥15 用土力学知识进行土坡稳定性分析与挡土墙设计
  • ¥70 PlayWright在Java上连接CDP关联本地Chrome启动失败,貌似是Windows端口转发问题
  • ¥15 帮我写一个c++工程
  • ¥30 Eclipse官网打不开,官网首页进不去,显示无法访问此页面,求解决方法
  • ¥15 关于smbclient 库的使用