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; binmode(STDOUT, ":raw: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. Scripts stored in ANSI work fine with mod_perl, too. httpd.conf: LoadFile "C:/Perl/bin/perl58.dll" LoadModule perl_module modules/mod_perl.so PerlSetEnv PATH "C:/Windows/System32;C:/Windows;C:/Perl;C:/Perl/Bin/" PerlRequire "C:/Program files/Apache group/Apache2/conf/startup.pl" Alias /cgi-foo/ "C:/shttps/cgi-foo/" <Location /cgi-foo> SetHandler perl-script PerlHandler ModPerl::PerlRun Options +ExecCGI -Indexes PerlOptions +ParseHeaders AllowOverride None </Location> startup.pl is reduced to: use Apache2 (); 1; but the longer version leads to the same results: use Apache2 (); use ModPerl::Util (); use Apache::RequestRec (); use Apache::RequestIO (); use Apache::RequestUtil (); use Apache::Server (); use Apache::ServerUtil (); use Apache::Connection (); use Apache::Log (); use Apache::Const -compile => ':common'; use APR::Const -compile => ':common'; use APR::Table (); use Apache::compat (); #use ModPerl::Registry (); use CGI (); use DBI (); use DBD::mysql (); 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! Igor K -- 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