doudi5892 2014-12-15 09:10
浏览 46

Doctrine2特殊字符浪费

I use doctrine 2... So some records (entities) in DB contains special characters and when Im reviewing text in phpmyadmin it shows correct text

35,000 years BP: Oase 1 (mandible) and Oase 2 (cranium) were both discovered in the Peştera cu Oase, Romania. The mandible was found first, in 2002, by speleologists Milota, Bîlgăr and Sarcină....

but in my entity on debug pause and in page on frontend I see wasters

35,000 years BP: Oase 1 (mandible) and Oase 2 (cranium) were both discovered in the Pe?tera cu Oase, Romania. The mandible was found first, in 2002, by speleologists Milota, B�lg?r and Sarcin?...

How can I fix it?

  • 写回答

1条回答 默认 最新

  • doucan1979 2014-12-15 14:19
    关注

    I have found answer that satisfied me... PHP function to convert unicode to special characters?

    <?php echo mb_convert_encoding($str, 'HTML-ENTITIES', 'UTF-8'); ?>
    
    评论

报告相同问题?

悬赏问题

  • ¥20 机器学习能否像多层线性模型一样处理嵌套数据
  • ¥20 西门子S7-Graph,S7-300,梯形图
  • ¥50 用易语言http 访问不了网页
  • ¥50 safari浏览器fetch提交数据后数据丢失问题
  • ¥15 matlab不知道怎么改,求解答!!
  • ¥15 永磁直线电机的电流环pi调不出来
  • ¥15 用stata实现聚类的代码
  • ¥15 请问paddlehub能支持移动端开发吗?在Android studio上该如何部署?
  • ¥20 docker里部署springboot项目,访问不到扬声器
  • ¥15 netty整合springboot之后自动重连失效