duancaoqin6683 2013-12-15 10:20 采纳率: 0%
浏览 44
已采纳

页面标题utf-8编码不起作用

I have a problem with some serbian letters showing in page title (they look like this %C5%A1). I added header('Content-type: text/html; charset=utf-8') on top of my page in first line and <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> above the title tag. Also my file that generates title is utf-8 encoded. Any idea why it still doesnt show properly?

  • 写回答

1条回答 默认 最新

  • drlnwji79147769 2013-12-15 10:30
    关注

    If it looks like "%C5%A1" then you probably got it from unparsed urlencoded string... this is not valid html entity, so it will stay like this no matter what. Try using urldecode PHP function on it.

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
编辑
预览

报告相同问题?

手机看
程序员都在用的中文IT技术交流社区

程序员都在用的中文IT技术交流社区

专业的中文 IT 技术社区,与千万技术人共成长

专业的中文 IT 技术社区,与千万技术人共成长

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

关注【CSDN】视频号,行业资讯、技术分享精彩不断,直播好礼送不停!

客服 返回
顶部