开发者

cakePHP, encoding problem when using find+list, no problem when using find+all

Well, I've configured the database.php file, added the 'encoding'=>'utf8' option. also added the $this->charset('utf8') to my view.

Now, when I use the find('list') and echo its content I get those k开发者_StackOverflow中文版nown question-marks. But, when I use the find('all) method, the data is delivered correctly.

And my questions are:

  1. Why?
  2. Who is to blame?
  3. How to solve ?(I really prefer the list way..)
  4. Should I drink more coffee?


can you try $this->find('all') and then use set to extract the values, like Set::extract('/Post/title', $posts); and print it out. if the find all was good and the set::extract is bad there could be a bug. If it works like normal then there is something weird as that is what the core does.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜