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:
- Why?
- Who is to blame?
- How to solve ?(I really prefer the list way..)
- 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.
精彩评论