I am trying to use CGI::Session (and of course, CGI::Cookie) together with 'use encoding "utf-8"', but things seems not to work.
The error is 'Can't locate object method "renewed" via package "Encode::utf8" at
I am not sure yet about who is responsbible for the bug, Encode, CGI::Session or CGI::Cookie. But if this kind of problem was detected previously probably somebody knows where is the problem and can point me to the correct place, so I can try to correct this bug.
Re: Using encoding and CGI Sessions/Cookies (Score:1)
What are you trying to achieve? The Encode module is enough for most cases. Read the first two of http://p3rl.org/UNI [p3rl.org].
Re: (Score:2)
The truth is that I tried to not use the encoding pragma. I do not like it as well. I prefer to binmode file handles and normally that works.
But with CGIs I get some problems. First, I am not able to binmode Template Toolkit when it opens templates. Or at least I can't find documentation on that.
The other problem is how to control the encoding from the environment variables, from CGI param and other stuff like that. But for these I think my current solution uses Encode already.
I'll fight with this script la
Re: (Score:1)
my $tt = Template->new({ENCODING => 'utf8',})Documented in http://search.cpan.org/perldoc?Template::FAQ#Why_do_I_get_rubbish_for_my_utf-8_t emplates? [cpan.org].
$tt->process($infile, $vars, $outfile, {binmode => ':utf8'},)Documented in http://search.cpan.org/perldoc?Template#process(%24template%2C_%5C%25vars%2C_%24 output%2C_%25options) [cpan.org].
Re: (Score:2)
Encode seems to have problems by itself.
Can't locate object method "renewed" via package "Encode::utf8" at /usr/lib/perl5/site_perl/5.10.0/Encode.pm line 174. ,
And this happens from time to time... :-(