[cgiapp] UTF-8 output

Michael Lackhoff lackhoff at zbmed.uni-koeln.de
Wed Nov 4 06:58:12 EST 2009


On 04.11.2009 12:19 Cees Hek wrote:

> You mean something like this:
> 
> __PACKAGE__->add_callback('postrun', sub {
>     my $self = shift;
> 
>     # Make sure the output is utf8 encoded if it needs it
>     if ( $_[0] && ${$_[0]} && utf8::is_utf8(${$_[0]}) ){
>         utf8::encode( ${$_[0]} );
>     }
> 
>     return;
> });
> 
> I have that in my CGI::App base class.

As time goes by my base class gets more and more pieces of yours ;-)

Thanks
-Michael


More information about the cgiapp mailing list