Page 1 of 3
1 · 2 · 3

Derick Ng :: 15.02.2009 02:41:20
There are however many more quirks when it comes to encodings e.g. truncating or counting of characters etc. I find explaining the handling of UTF-8 strings with PHP pretty well.
lecterror :: 15.02.2009 17:19:52
Of course, there is a lot more to it, but related to plain PHP. I just wanted to cover the steps to make CakePHP work properly with UTF-8. I just hope I didn't forget anything...
Robert :: 18.02.2009 20:33:28
I did all the steps you mention, but I still have a problem.
I have a function inside a component, which returns an array.
The key and the value of a pair has special characters.
In the controller I then set this array to a $variable to render.
And in the view I use this $variable as the options of a select input.
$form->input(model.field, array('options' => $variable)).
But the option that has the special character is not rendered.
Robert :: 18.02.2009 20:36:17
I tried also passing with the HTML code for special characters, but the input select will just simply render the code.
é or whatever
lecterror :: 19.02.2009 05:28:52
Hi Robert,

Since your function is returning an array, you have to check the source of your data. Do the array values come from the database? Or are they hard-coded in your component?

If they are hard-coded, re-check the file encoding of your component. If they come from the database, check the encoding of your DB connection, database tables/fields, and last but not least, make sure those values are entered correctly in the database.

This is all I can think of right now.. Try using Cake's own debug tools and Firebug if you're not already, that ought to help in search for clues.