
dba at richyen
Aug 28, 2007, 4:19 PM
Views: 3746
Permalink
|
|
saving decoded unicode value to Session causes error
|
|
Hi, Wondering if anyone has ever encountered this issue. Trying to internationalize my site, so at every input, I pass it through Encode::decode_utf8. However, when I attempt to put the values into Session, I get the following message: > Errors Output > Wide character in subroutine entry at /usr/local/perl/lib/site_perl/ > 5.8.7/MLDBM/Sync/SDBM_File.pm line 80, <GEN10> line 21. , /usr/ > local/perl/lib/site_perl/5.8.7/Apache/ASP.pm line 1521 > Debug Output > Use of uninitialized value in string ne at ../global/lib/ > lib_filesystem.pm line 41. > Using an array as a reference is deprecated at ../global/lib/ > lib_peer_review.pm line 389, line 21. > Wide character in subroutine entry at /usr/local/perl/lib/site_perl/ > 5.8.7/MLDBM/Sync/SDBM_File.pm line 80, line 21. , /usr/local/perl/ > lib/site_perl/5.8.7/Apache/ASP.pm line 1521 An example is if I use the capital Omega character (option-z on mac keyboard), this error occurs when attempting to store into Session: > my $secret_answer = Encode::decode_utf8($main::Request->Form > ('secret_answer')); > $main::Session->{secret_answer} = $secret_answer; I've discovered that if I put the decoded value into a hash, and then put the hash into Session, it behaves normally. Also, if I don't decode at all, it behaves normally also. Would anyone know why this happens, or how to fix it? Thanks! --Richard --------------------------------------------------------------------- To unsubscribe, e-mail: asp-unsubscribe[at]perl.apache.org For additional commands, e-mail: asp-help[at]perl.apache.org
|