On Sat, 23 Jun 2012, Pedro Melo wrote: > On Sat, Jun 23, 2012 at 2:02 AM, A Kobame <kobam...@gmail.com> wrote:
>> could you please add to the next Mason2 version - adding: >> >> use utf8; >> >> into each generated *.obj file? (...) > I don't agree that a specific "use utf8" should be added be default. > OTHO, the above ::Compilation subclass is the first thing I type when > starting a new Mason project, so maybe a shortcut like: > > Mason->new(common_obj_header => 'perl code here, for ex. use uft8;') > > would save some typing... I don't know what you ware doing there (I just started using Mason), but I ran into the UTF-8 problem and solved it. To solve this, I configured apache like this: <IfModule mod_perl.c> PerlModule HTML::Mason::ApacheHandler PerlSetVar MasonPreamble "use utf8;" <FilesMatch "\.hpl$"> SetHandler perl-script PerlHandler HTML::Mason::ApacheHandler </FilesMatch> </IfModule> There is a page about doing UTF-8 in Mason: http://www.cybaea.net/Blogs/TechNotes/Mason-utf-8-clean.html I did NOT do step one as decribed. Instead, I just set the correct <meta> content-type. Setting the content-type in the apache configuration will make you unpopular with your users. You have to do part 2 and part 3. I did not have to do step 4, but if you use a database, you will possibly need to do it. ------------------------------------------------------------------------------ Live Security Virtual Conference Exclusive live event will cover all the ways today's security and threat landscape has changed and how IT managers can respond. Discussions will include endpoint security, mobile security and the latest in malware threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/ _______________________________________________ Mason-users mailing list Mason-users@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/mason-users