[Catalyst] Catalyst-plugin-prototype supports UTF8?

Diego Kuperman diego at freekeylabs.com
Wed Nov 1 18:54:51 GMT 2006


Hi!, I was having same problems with Spanish chars :(

The main problem is that DBD::mysql didn't mark Unicode. I think there 
are some test version that solve this, but in the meantime you can try 
DBIx::Class::UTF8Columns or hand mark it using Encode::_utf8_on().

There are other "tricky" way to do it:

$utf8_ok = decode('utf8', $string_from_mysql_that_you_know_is_utf8);

You can read about it on the Encode pod page.

Hope this helps you!
Diego

Mao DengFeng-e13751 wrote:
> I have try below solution. This issue is not solved.
> 
> 
>  
> 
>  
> 
> -----Original Message-----
> From: Mao DengFeng-e13751 
> Sent: Wednesday, November 01, 2006 5:59 PM
> To: The elegant MVC web framework
> Subject: RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?
> 
> Ok, I will try your solution.
> 
> Thanks
> Mao Dengfeng 
> 
> 
> ================================================
> POPI:
> Motorola General Business Information  [ ]
> Motorola Internal Use Only                   [X]
> Motorola Confidential Proprietary           [ ]
> 
>  
> 
> -----Original Message-----
> From: apv [mailto:apv at sedition.com]
> Sent: Wednesday, November 01, 2006 5:08 PM
> To: The elegant MVC web framework
> Subject: Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?
> 
> Yes, I do think this is the same problem I was having. The form field is
> fine. The other utf-8 on the page which is displayed correctly when
> there is not a form loaded with utf8 becomes mangled.
> 
> Try Catalyst::View::TT::ForceUTF8 if you are using TT2. It fixed my
> problems completely (except that it doesn't acknowledge non-standard
> tags have been defined, and I normally prefer not to use [% %]). Still,
> small price to pay.
> 
> On Wednesday, Nov 1, 2006, at 00:38 US/Pacific, Mao DengFeng-e13751
> wrote:
> 
>> Thanks for your quikly reply.
>> For the form in the page, The utf8 characters can be displayed 
>> correctly .
>> For example, chinese characters can be displayed correctly in 
>> <textara></textarea>
>>
>> --------Mao DengFeng
>>
>>
>>
>> -----Original Message-----
>> From: apv [mailto:apv at sedition.com]
>> Sent: Wednesday, November 01, 2006 4:29 PM
>> To: The elegant MVC web framework
>> Subject: Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?
>>
>> I was getting the same thing in my apps. They display utf8 fine as 
>> long as there is no utf8 in a form in the same page.
>>
>> Catalyst::Plugin::Unicode combined with Catalyst::View::TT::ForceUTF8 
>> fixes this for me. I don't speak Chinese but it is what I usually use 
>> to test the unicode and it appears to work fine for both FCGI and the 
>> test server. I am not doing any AJAX right now so I'm not sure if 
>> there are any issues in that layer (JS<->Perl).
>>
>> -Ashley
>>
>>
>> On Tuesday, Oct 31, 2006, at 23:47 US/Pacific, Mao DengFeng-e13751
>> wrote:
>>
>>> Hi, all
>>>
>>> I am studying MiniMojo example in catalyst.
>>> I try to use mysql as the database.
>>> The sample can work well but  I got wild charater when I input 
>>> chinese
>>> charater.
>>> Please review below steps
>>> 1. I use UTF8 charset both webpage and mysql database.
>>> 2. When I input chinese charaters and submit, The text area and mysql
> 
>>> database can display chinese charaters correctly. But I got wild
>>> charaters in   <div id="view"></div>
>>> 3. I have checked mysql database which is updated by the example. The
> 
>>> chinese characters can be displayed correctly.
>>>
>>> Because the "view" area is updated by Catalyst-plugin-prototype 
>>> according the input of text area. I think the issue is caused by 
>>> Catalyst-plugin-prototype.
>>>
>>> Please give me some advice to fix this issue
>>>
>>> Thanks
>>>
>>> Mao Deng feng
>>>
>>> _______________________________________________
>>> List: Catalyst at lists.rawmode.org
>>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>>> Searchable archive:
>>> http://www.mail-archive.com/catalyst@lists.rawmode.org/
>>> Dev site: http://dev.catalyst.perl.org/
>>>
>>>
>>>
>>
>> -Ashley
>> --
>> http://sedition.com * http://sedition.com/ddx http://querylog.com * 
>> http://ashleypond.com/v
>>
>>
>> _______________________________________________
>> List: Catalyst at lists.rawmode.org
>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>> Searchable archive:
>> http://www.mail-archive.com/catalyst@lists.rawmode.org/
>> Dev site: http://dev.catalyst.perl.org/
>>
>> _______________________________________________
>> List: Catalyst at lists.rawmode.org
>> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
>> Searchable archive: 
>> http://www.mail-archive.com/catalyst@lists.rawmode.org/
>> Dev site: http://dev.catalyst.perl.org/
>>
>>
>>
> 
> 
> -Ashley
> --
> http://sedition.com * http://sedition.com/ddx http://querylog.com *
> http://ashleypond.com/v
> 
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive:
> http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/
> 
> _______________________________________________
> List: Catalyst at lists.rawmode.org
> Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> Searchable archive: http://www.mail-archive.com/catalyst@lists.rawmode.org/
> Dev site: http://dev.catalyst.perl.org/



More information about the Catalyst mailing list