> binmode(STDOUT, ":raw:utf8");Hi everybody. I ran into a problem with Perl scripts stored in utf-8 and I couldn't find the answer to it on the Internet or mailing lists. Please tell me what I'm missing.
SYSTEM: Windows XP SP2, Active Perl 5.8.4.810, Apache 2.048, mod_perl 1.9912.
I need to run scripts stored in utf-8. Here is the code of a test SCRIPT:
use utf8;
print "Content-Type: text/html\n\n";
> print "hello";
[...]
[...]I use the Windows' Notepad and save the file as utf-8. Everything works fine while I run the script from the command line or through CGI without mod_perl. PROBLEM: When I try to run the script using mod_perl, I get the following ERROR:
[error] 3320: ModPerl::PerlRun: Unrecognized character \xEF at .../CGI-FOO/TEST.PL line 1.
It seems as if mod_perl doesn't recognize the format of the script file correctly. Any tips why this may occur? Thanks a bundle in advance!
Wow! That's interesting.
Please take a look at the code in function convert_script_to_compiled_handler at ModPerl-Registry/lib/ModPerl/RegistryCooker.pm, and suggest a fix. You probably want to add:
use Carp; $SIG{__DIE__} = \&Carp::confess;
somewhere at the startup to see where exactly it fails.
Also I'd appreciate if you could send this script with BOM as an attachment so that we can test it. Not sure if it'll be reproducable on linux.
-- __________________________________________________________________ Stas Bekman JAm_pH ------> Just Another mod_perl Hacker http://stason.org/ mod_perl Guide ---> http://perl.apache.org mailto:[EMAIL PROTECTED] http://use.perl.org http://apacheweek.com http://modperlbook.org http://apache.org http://ticketmaster.com
-- Report problems: http://perl.apache.org/bugs/ Mail list info: http://perl.apache.org/maillist/modperl.html List etiquette: http://perl.apache.org/maillist/email-etiquette.html