Skip Menu |

This queue is for tickets about the Catalyst-View-TT CPAN distribution.

Report information
The Basics
Id: 23978
Status: rejected
Priority: 0/
Queue: Catalyst-View-TT

People
Owner: Nobody in particular
Requestors: chris+rt [...] chrisdolan.net
Cc:
AdminCc:

Bug Information
Severity: Wishlist
Broken in: 0.23
Fixed in: (no value)



Subject: [WISH] binmode => :utf8 argument to process()
TT supports an optional argument to process() that allows the programmer to specify a binmode for the opened files. The following example comes from the Template.pm POD: $tt->process($infile, $vars, $outfile, binmode => ':utf8') || die $tt->error(), "\n"; Currently, Catalyst::View::TT offers no way to pass this argument (as far as I can tell) so I have to put a UTF8 BOM (\x{ef}\x{bb}\x{bf}) at the beginning of every .tt file that contains non-ASCII. Some text editors don't preserve this BOM, so I'd like an alternative. Thanks, Chris
I am going to mark this ticket as rejected for the following reason: Template::Toolkit supports a config parameter to set a default encoding. You can use it like this: __PACKAGE__->config( 'View::TT' => { ENCODING => 'UTF8' } ); This seems to be confirmed by this set of "Catalyst Tips": http://www.sonnentaler.net/info/team/bits.html Thank you for your time. Please feel free to re-open this ticket if you have any new information to add.