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');
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'} } );
The odd thing is:

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

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.