Thanks for the info Kirk! I'll be using this as well in the future.
--
Louie Miranda
 - Email: lmira...@gmail.com
 - Web: http://www.louiemiranda.com



On Wed, Jul 21, 2010 at 10:14 AM, Kirk <k...@kirkkahn.com> wrote:

> I thought it might get annoying... my conversation with myself. But I hope
> it helps someone!
>
>
> On Tue, Jul 20, 2010 at 7:47 PM, MattyHead <mattyh...@gmail.com> wrote:
>
>> Thank you for posting your whole experience with this!  And
>> congratulations for figuring it out so quickly.
>>
>> Cheers,
>> Matt
>>
>> On Tue, Jul 20, 2010 at 7:15 PM, Kirk <k...@kirkkahn.com> wrote:
>>
>>> i found the solution here:
>>> http://www.jotlab.com/2009/03/03/cakephp-utf-8/
>>>
>>> all you have to do is add 'encoding' => 'UTF8' to database.php
>>>
>>> doh!
>>>
>>>
>>> On Tue, Jul 20, 2010 at 6:59 PM, Kirk <k...@kirkkahn.com> wrote:
>>>
>>>> And the plot thickens...
>>>>
>>>> If I change the character encoding in core.php to:
>>>>
>>>> Configure::write('App.encoding', 'ISO-8859-1');
>>>>
>>>> Then suddenly the text shows up correctly. Which means that even though
>>>> I'm specifying UTF-8 as the character encoding, cake is still using
>>>> ISO-8859-1 (or Windows-1252?) encoding while saying that it's using UTF-8.
>>>> How frustrating!
>>>>
>>>>
>>>> On Tue, Jul 20, 2010 at 6:17 PM, Kirk <k...@kirkkahn.com> wrote:
>>>>
>>>>> As an extra piece of information, if I specify the escape option
>>>>> as 'ISO-8859-1' in the link method of the html helper (
>>>>> http://book.cakephp.org/view/1442/link), the non-ascii characters are
>>>>> substituted for html entities, and it renders fine (without the little
>>>>> question marks). (I am using Windows, btw)
>>>>>
>>>>>
>>>>> On Tue, Jul 20, 2010 at 5:37 PM, Kirk <k...@kirkkahn.com> wrote:
>>>>>
>>>>>> I thought someone here may have some experience with this. I fetch
>>>>>> utf-8 data from a mysql db using:
>>>>>>
>>>>>> $this->data = find('all',$options);
>>>>>>
>>>>>> From within the controller, if I debug($this->data), I get something
>>>>>> like:
>>>>>>
>>>>>>     [1] => Array
>>>>>>         (
>>>>>>             [Subdivision] => Array
>>>>>>                 (
>>>>>>                     [name] => Aïn Témouchent
>>>>>>                 )
>>>>>>
>>>>>> But if I debug($this->data) in the view, I get something like:
>>>>>>
>>>>>>     [1] => Array
>>>>>>         (
>>>>>>             [Subdivision] => Array
>>>>>>                 (
>>>>>>                     [name] => A�n T�mouchent
>>>>>>                 )
>>>>>>
>>>>>> The non-ascii characters don't show up correctly. I can't figure out
>>>>>> why this is happening. In my core.php, I have the following option:
>>>>>>
>>>>>> Configure::write('App.encoding', 'UTF-8');
>>>>>>
>>>>>> I'm not sure what else I need to check. Any help would be greatly
>>>>>> appreciated.
>>>>>>
>>>>>> Thanks,
>>>>>> ~Kirk
>>>>>>
>>>>>
>>>>>
>>>>
>>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>>> others with their CakePHP related questions.
>>>
>>> You received this message because you are subscribed to the Google Groups
>>> "CakePHP" group.
>>> To post to this group, send email to cake-php@googlegroups.com
>>> To unsubscribe from this group, send email to
>>> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>>>  more options, visit this group at
>>> http://groups.google.com/group/cake-php?hl=en
>>>
>>
>>  Check out the new CakePHP Questions site http://cakeqs.org and help
>> others with their CakePHP related questions.
>>
>> You received this message because you are subscribed to the Google Groups
>> "CakePHP" group.
>> To post to this group, send email to cake-php@googlegroups.com
>> To unsubscribe from this group, send email to
>> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>>  more options, visit this group at
>> http://groups.google.com/group/cake-php?hl=en
>>
>
>  Check out the new CakePHP Questions site http://cakeqs.org and help
> others with their CakePHP related questions.
>
> You received this message because you are subscribed to the Google Groups
> "CakePHP" group.
> To post to this group, send email to cake-php@googlegroups.com
> To unsubscribe from this group, send email to
> cake-php+unsubscr...@googlegroups.com<cake-php%2bunsubscr...@googlegroups.com>For
>  more options, visit this group at
> http://groups.google.com/group/cake-php?hl=en
>

Check out the new CakePHP Questions site http://cakeqs.org and help others with 
their CakePHP related questions.

You received this message because you are subscribed to the Google Groups 
"CakePHP" group.
To post to this group, send email to cake-php@googlegroups.com
To unsubscribe from this group, send email to
cake-php+unsubscr...@googlegroups.com For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en

Reply via email to