Hi monks,
Several days ago, I posted the question about WRAPPER. Thanks sincere help by monks, I use this way to fulfill my target.
But....... this new trick bring me new problem. Below are my partial codes:
wrapper.tt [% IF no_wrapper; content; ELSE; wrapper = wrapper || 'full.tt'; content WRAPPER $wrapper; END; -%]
full.tt <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w +3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> <!-- Design by Andy --> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8" /> <link href="static/css/default.css" rel="stylesheet" type="text/css" / +> <meta name="Keywords" content="" /> <meta name="Description" content="" /> <link rel="stylesheet" type="text/css" media="screen" href="static/css +/ui-lightness/jquery-ui-1.8.1.custom.css" /> <script type="text/javascript" src="static/js/jquery-1.4.2.min.js" > </script> .............. .............. include some Asian characters ............. ............. <div id="footer"> <p>Copyright (c) 2010 Andy All rights reserved. Design by Andy </p +> </div> <div style="font-size: 0.8em; text-align: center;"> <br /> <br /> </div> </body> </html>
Myapp.pm package Myapp; use Moose; use namespace::autoclean; use Catalyst::Runtime 5.80; # Set flags and add plugins for the application # # -Debug: activates the debug mode for very useful log message +s # ConfigLoader: will load the configuration from a Config::General f +ile in the # application's home directory # Static::Simple: will serve static files from the application's root # directory use Catalyst qw/ -Debug ConfigLoader Static::Simple StackTrace Unicode /; </p>
some controller code: sub purchase_manage : Local { my ( $self, $c ) = @_; $c->stash(no_wrapper => 0); $c->stash(merchants => [$c->model('WindyDB::Merchant')->all]); # T +here are some Asian characters stored in DB. $c->stash(persons => [$c->model('WindyDB::person')->all]); # dit +to $c->stash(no_wrapper => 0); $c->stash(template => 'purchase_manage.tt');
The odd thing is:package UW::Model::WindyDB; use lib '/opt/oracle/product/11.2.0/dbhome_1/perl/lib/site_perl/5.10.0 +/i686-linux-thread-multi/'; use strict; use base 'Catalyst::Model::DBIC::Schema'; __PACKAGE__->config( schema_class => 'UW::Schema', connect_info => { dsn => 'dbi:Oracle:oraUW', user => 'UW', password => 'windy123', {oracharset => 'AL32UTF8'} } );
Any thoughts? I'm looking forward to any replies! TIA
I am trying to improve my English skills, if you see a mistake please feel free to reply or /msg me a correction
In reply to Catalyst WRAPPER and Unicode (Episode 2) by xiaoyafeng
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |