Re: [Catalyst] Chained actions usage and DBIC performance

2006-11-01 Thread David Jack Olrik


On 30/10/2006, at 22.28, Nilson Santos Figueiredo Junior wrote:


Does everyone use chained actions like this?


http://www.onemogin.com/blog/528-chained-searches-the-beauty-of- 
dbixclass-and-catalyst.html


--
Best regards,
David Jack Olrik <[EMAIL PROTECTED]> http://david.olrik.dk
GnuPG fingerprint C290 0A4A 0CCC CBA8 2B37 E18D 01D2 F6EF 2E61 9894
["The first rule of Perl club is  You do not talk about Perl club"]




___
List: Catalyst@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/


Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread apv

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   
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@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@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/


RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Mao DengFeng-e13751
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


Mao DengFeng



-Original Message-
From: apv [mailto:[EMAIL PROTECTED] 
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   
> 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@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@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@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/


Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread apv

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


Mao DengFeng



-Original Message-
From: apv [mailto:[EMAIL PROTECTED]
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   
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@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@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@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@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/


Re: [Catalyst] regexes and auto actions

2006-11-01 Thread Carl Johnstone
Use a controller base class that implements the story/comments actions, 
and just set the relevant section (i.e. news, sport, football) in an auto 
or a begin action.


We've already got an auto in the base class to do that, we can then generate 
navigation, breadcrumbs etc. However we have specific bits of code to run 
too, so we'd end up with a list of conditionals in there.


Carl


___
List: Catalyst@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/


RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Mao DengFeng-e13751
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:[EMAIL PROTECTED] 
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 
> 
>
> Mao DengFeng
>
>
>
> -Original Message-
> From: apv [mailto:[EMAIL PROTECTED]
> 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   
>> 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@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@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@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@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@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/


Re: [Catalyst] regexes and auto actions

2006-11-01 Thread Carl Johnstone



In practice however only /article/auto and /auto get called.


Do those two auto subs return true?


I'm fairly sure they do (don't have access to the code at the moment).

I don't think I've got a bug, just that the way Catalyst works isn't exactly 
what I expected...


Carl


___
List: Catalyst@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/


RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Mao DengFeng-e13751
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:[EMAIL PROTECTED]
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 
> 
>
> Mao DengFeng
>
>
>
> -Original Message-
> From: apv [mailto:[EMAIL PROTECTED]
> 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   
>> 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@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@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@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@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@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@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/


Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Zbigniew Lukasiak

You might check if the utf8 flag is set on the data returned by the db
handle.  I know that in PostgreSQL you need to use pg_enable_utf8 to
have that.

To check it just use the is_utf8 function from Encode.

--
Zbyszek

On 11/1/06, Mao DengFeng-e13751 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
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
> 
>
> Mao DengFeng
>
>
>
> -Original Message-
> From: apv [mailto:[EMAIL PROTECTED]
> 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   
>> 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@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@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@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@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@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@lists.rawmode.org
Listinfo: http://lists.rawmode.org/mailman/li

Re: [Catalyst] catalyst + embedded systems?

2006-11-01 Thread Jess Robinson



On Mon, 30 Oct 2006, Jonathan Rockway wrote:


Anyone try anything like this:

http://bec-systems.com/web/content/view/46/9/

with Perl5 and Catalyst?  I'd be interested in hearing how it performs.



I'm still trying to get my Catalyst app (and its 5 million dependencies) 
sanely installed on my ARM-based subnotebook, haven't got to actually 
running it yet..


Currently I'm trying with lighttpd, fastcgi, TT, SQLite etc. Clearsilver 
looks interesting on there, has anyone tried it? I'm guessing I'll need page and 
TT caching at some point for the speed.


Jess


___
List: Catalyst@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/


Re: [Catalyst] Chained actions usage and DBIC performance

2006-11-01 Thread Nilson Santos Figueiredo Junior

On 11/1/06, David Jack Olrik <[EMAIL PROTECTED]> wrote:

http://www.onemogin.com/blog/528-chained-searches-the-beauty-of-
dbixclass-and-catalyst.html


Nice article. However, by "chained actions" I meant Catalyst's builtin
Chained actions. But I guess it still added some weight to the
previous suggestion of using search for everything.

By the way... in your search_date() method. Are you aware that
DBIx::Class understands DateTime objects directly when using
InflateColumn::DateTime? Or is it that you really prefer to manually
build the string instead of using the date manipulating routines in
DateTime?

-Nilson Santos F. Jr.

___
List: Catalyst@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/


[Catalyst] Re: template comparison (was: why not mason

2006-11-01 Thread A. Pagaltzis
* Perrin Harkins <[EMAIL PROTECTED]> [2006-10-28 06:05]:
> A. Pagaltzis wrote:
> >TT2 provides a single minilanguage for both, which is
> >unnecessarily powerful and verbose for the 18% and way
> >underpowered for the 2%.
> 
> You're only supposed to use the TT language for simple things.
> Hairy things are supposed to be encapsulated in plugins,
> written in Perl.

That makes a certain amount of sense; I say a certain amount,
because I’m not sure what case it makes for TT2:

1. Some bits of hairy display logic really are specific to the
   particular template they’re in, so putting them in a plugin
   just pointlessly moves apart related bits of code.
   
2. Sometimes there are still large blocks of static strings
   interspersed with such logic, so it’s more of a sub-template
   task than a plugin task.

3. If you’re going to bail out to the Perl layer for complex
   stuff (which you should), you might as well pick something
   with a more concise markup generation syntax than TT2’s for
   the simple stuff. (I admit TT2 fares decently when producing
   plain text formats – but I’ve never had to do that.)

Regards,
-- 
Aristotle Pagaltzis // 

___
List: Catalyst@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/


[Catalyst] Newbie needs help with tutorial

2006-11-01 Thread Richard Wolfe
Hello all-

I've been writing (bad) Perl/CGI scripts for years, but am just now
trying to get my head around Catalyst (and MVC in general). I managed to
get Catalyst installed on my little Linux box here, and I'm busily
working my way through Catalyst::Manual::Tutorial.

In working my way through Part 2 (Catalyst Basics) of the tutorial, I
create my new Catalyst project and start up the server and can browse to
it no problem. But after I step through all the other tasks on this
portion of the tutorial (create a database, MyAppDB.pm, the "result
source" files, the controller, etc.) the server throws an error when I
try to start it:

[EMAIL PROTECTED] MyApp]$ script/myapp_server.pl 
Couldn't instantiate component "MyApp::Model::MyAppDB", "Cannot load
schema class 'MyAppDB': Recursive inheritance detected while looking for
method 'can' in package 'DBIx::Class::Componentised' at
/usr/lib/perl5/site_perl/5.8.8/DBIx/Class/Componentised.pm line 76.
Compilation failed in require at
/usr/lib/perl5/site_perl/5.8.8/Catalyst/Model/DBIC/Schema.pm line 272.
 at script/myapp_server.pl line 53" at script/myapp_server.pl line 53
Compilation failed in require at script/myapp_server.pl line 53.

I've re-checked my work several times but can't find any place where I
have strayed from the instructions. Could someone possibly give me a
push in the right direction and let me know what I'm doing wrong?

Thanks in advance,
Richard



___
List: Catalyst@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/


Re: [Catalyst] Re: template comparison (was: why not mason

2006-11-01 Thread Perrin Harkins
On Wed, 2006-11-01 at 17:17 +0100, A. Pagaltzis wrote:
> * Perrin Harkins <[EMAIL PROTECTED]> [2006-10-28 06:05]:
> > You're only supposed to use the TT language for simple things.
> > Hairy things are supposed to be encapsulated in plugins,
> > written in Perl.
> 
> That makes a certain amount of sense; I say a certain amount,
> because I’m not sure what case it makes for TT2:

I'm not trying to make a case for TT2.  Some people will prefer other
things, and I personally use different systems on different projects.
I'm just advising that people who use TT2 would be better off if they
avoid trying to code complex logic in the TT2 mini-language.

> 1. Some bits of hairy display logic really are specific to the
>particular template they’re in, so putting them in a plugin
>just pointlessly moves apart related bits of code.
>
> 2. Sometimes there are still large blocks of static strings
>interspersed with such logic, so it’s more of a sub-template
>task than a plugin task.

TT provides multiple ways to make sub-templates, which can take
parameters.  If you have some code that's really single-use and you want
to keep it in the template, you could use an in-line perl section in an
included template for that one bit.

Personally, I would use a plugin anyway, because the tools (debugger,
profiler, etc.) work a lot better on a perl module than on a template
with in-line code, and the code is easier to test.

> 3. If you’re going to bail out to the Perl layer for complex
>stuff (which you should), you might as well pick something
>with a more concise markup generation syntax than TT2’s for
>the simple stuff. (I admit TT2 fares decently when producing
>plain text formats – but I’ve never had to do that.)

Something with fewer keywords, you mean?  What would that be?
HTML::Template?  I think the additional abstraction for data access that
TT provides usually makes for simpler templates and avoids needing to
code a lot of repetitive data copying in perl, and the plugin support
makes it a lot easier to deal with formatting dates and numbers and
handling multi-column lists.  I'd be perfectly happy to see TT remove
some of the current keywords, but the things I don't use don't really
cause any problems for me.

- Perrin


___
List: Catalyst@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/


Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Diego Kuperman

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:[EMAIL PROTECTED]
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 



Mao DengFeng



-Original Message-
From: apv [mailto:[EMAIL PROTECTED]
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   
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@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@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@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@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@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@lists.rawmode.

Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Jonathan Rockway
> Encode::_utf8_on().

Don't touch the UTF8 flag.  Do this:

$data = source_of_utf8_octets();
utf8::decode($data);

You can also get utf8 data like:

package foo;
use utf8;
my $data = "任天堂"; # 3 characters, no octets; don't call decode()

or

open(my $fh, '<:utf8', $filename)
my $data = do { local $/; <$fh> };

Playing with perl's internals isn't necessary, even though a few modules
do it any way.  The key is to make sure you get everything.  Try
encoding::warnings to help you.  (I tried and failed a number of times
with Encode::_utf8_on()... weird crashes, double-encoding, etc.  Just
use decode(); I do and everything works great.  You don't even need
View::TT::ForceUTF8 anymore, since you're doing everything correctly.)

If you are using utf8, you'll want C::P::Unicode also.  This will
encode() your output, so perl characters are transformed to utf8 octets.
 Otherwise you'll get errors about wide-characters in print at
Catalyst::Engine line something.  (This applies everywhere -- if you
pass characters where octets are expected, you'll receive a warning or
error from the interperter.  In that case, encode the characters to
octets.  Digest::MD5, for one, requires this because MD5 assumes 8-bit
characters.)

Regards,
Jonathan Rockway

-- 
package JAPH;use Catalyst qw/-Debug/;($;=JAPH)->config(name => do {
$,.=reverse qw[Jonathan tsu rehton lre rekca Rockway][$_].[split //,
";$;"]->[$_].q; ;for 1..4;$,=~s;^.;;;$,});$;->setup;

___
List: Catalyst@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/


Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Nathan Gray
On Wed, Nov 01, 2006 at 01:31:19PM -0600, Jonathan Rockway wrote:
> Don't touch the UTF8 flag.  Do this:
> 
> $data = source_of_utf8_octets();
> utf8::decode($data);
> 
> You can also get utf8 data like:
> 
> package foo;
> use utf8;
> my $data = "任天堂"; # 3 characters, no octets; don't call decode()
> 
> or
> 
> open(my $fh, '<:utf8', $filename)
> my $data = do { local $/; <$fh> };

And there is a nice tutorial at:

  http://search.cpan.org/~rgarcia/perl-5.9.4/pod/perlunitut.pod

-kolibrie


___
List: Catalyst@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/


Re: [Catalyst] Newbie needs help with tutorial

2006-11-01 Thread JT Justman
Richard Wolfe wrote:
> Hello all-
> 
> I've been writing (bad) Perl/CGI scripts for years, but am just now
> trying to get my head around Catalyst (and MVC in general). I managed to
> get Catalyst installed on my little Linux box here, and I'm busily
> working my way through Catalyst::Manual::Tutorial.
> 
> In working my way through Part 2 (Catalyst Basics) of the tutorial, I
> create my new Catalyst project and start up the server and can browse to
> it no problem. But after I step through all the other tasks on this
> portion of the tutorial (create a database, MyAppDB.pm, the "result
> source" files, the controller, etc.) the server throws an error when I
> try to start it:
> 
> [EMAIL PROTECTED] MyApp]$ script/myapp_server.pl 
> Couldn't instantiate component "MyApp::Model::MyAppDB", "Cannot load
> schema class 'MyAppDB': Recursive inheritance detected while looking for
> method 'can' in package 'DBIx::Class::Componentised' at
> /usr/lib/perl5/site_perl/5.8.8/DBIx/Class/Componentised.pm line 76.
> Compilation failed in require at
> /usr/lib/perl5/site_perl/5.8.8/Catalyst/Model/DBIC/Schema.pm line 272.
>  at script/myapp_server.pl line 53" at script/myapp_server.pl line 53
> Compilation failed in require at script/myapp_server.pl line 53.
> 

Well, it sort of looks to my untrained eye like some component of your
schema is loading either the main Schema class or something else.

In your MyAppDB.pm file, what do you have in load_classes? If it's
blank, IIRC it will automatically load all the modules in the MyAppDB
directory. Perhaps you have something in there you didn't mean to have,
such as a copy of MyAppDB.pm? Look carefully at each of those classes,
and try disabling them one at a time.

It may help to check out a copy of the finished app from svn to have
something to compare to.

JT

___
List: Catalyst@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/


RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Mao DengFeng-e13751
 
I am sure the data  returned by db handle is UTF8. Because  the data can
be displayed correctly in  of form element.

Thanks
Mao Dengfeng
 

-Original Message-
From: Zbigniew Lukasiak [mailto:[EMAIL PROTECTED] 
Sent: Wednesday, November 01, 2006 6:56 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

You might check if the utf8 flag is set on the data returned by the db
handle.  I know that in PostgreSQL you need to use pg_enable_utf8 to
have that.

To check it just use the is_utf8 function from Encode.

--
Zbyszek

On 11/1/06, Mao DengFeng-e13751 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> 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 
> > 
> >
> > Mao DengFeng
> >
> >
> >
> > -Original Message-
> > From: apv [mailto:[EMAIL PROTECTED]
> > 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   
> >> 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@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@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@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://ashleyp

RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Sascha Kiefer
Well, it might by a prototype
problem. But i can think of any encoding inside
the perl. Maybe it is part of the javascript the
does something wrong.

Maybe i'll find time to do some testing.

So long,
--esskar

> -Original Message-
> From: Mao DengFeng-e13751 [mailto:[EMAIL PROTECTED] 
> Sent: Donnerstag, 2. November 2006 09:00
> To: The elegant MVC web framework
> Subject: RE: [Catalyst] Catalyst-plugin-prototype supports UTF8?
> 
>  
> I am sure the data  returned by db handle is UTF8. Because  
> the data can be displayed correctly in  of form element.
> 
> Thanks
> Mao Dengfeng
>  
> 
> -Original Message-
> From: Zbigniew Lukasiak [mailto:[EMAIL PROTECTED]
> Sent: Wednesday, November 01, 2006 6:56 PM
> To: The elegant MVC web framework
> Subject: Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?
> 
> You might check if the utf8 flag is set on the data returned 
> by the db handle.  I know that in PostgreSQL you need to use 
> pg_enable_utf8 to have that.
> 
> To check it just use the is_utf8 function from Encode.
> 
> --
> Zbyszek
> 
> On 11/1/06, Mao DengFeng-e13751 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> > 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 
> > > 
> > >
> > > Mao DengFeng
> > >
> > >
> > >
> > > -Original Message-
> > > From: apv [mailto:[EMAIL PROTECTED]
> > > 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   
> > >> 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@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

Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

2006-11-01 Thread Zbigniew Lukasiak

Don't assume - check.  There might be multiple conversions on the way
and the display might work - but still the underlying data might be
wrong.

--
Zbyszek

On 11/2/06, Mao DengFeng-e13751 <[EMAIL PROTECTED]> wrote:


I am sure the data  returned by db handle is UTF8. Because  the data can
be displayed correctly in  of form element.

Thanks
Mao Dengfeng


-Original Message-
From: Zbigniew Lukasiak [mailto:[EMAIL PROTECTED]
Sent: Wednesday, November 01, 2006 6:56 PM
To: The elegant MVC web framework
Subject: Re: [Catalyst] Catalyst-plugin-prototype supports UTF8?

You might check if the utf8 flag is set on the data returned by the db
handle.  I know that in PostgreSQL you need to use pg_enable_utf8 to
have that.

To check it just use the is_utf8 function from Encode.

--
Zbyszek

On 11/1/06, Mao DengFeng-e13751 <[EMAIL PROTECTED]> 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:[EMAIL PROTECTED]
> 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
> > 
> >
> > Mao DengFeng
> >
> >
> >
> > -Original Message-
> > From: apv [mailto:[EMAIL PROTECTED]
> > 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   
> >> 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@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@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@lists.rawmode.org
> > Listinfo: http://lists.rawmode.org/mailman/listinfo/catalyst
> > Searchable archive:
> > http://www.mail-arc