Hi everybody,

I hope this message will find its way to the thread I started on the list.

Thanks a lot to all the participants of the discussion, the problem was indeed 
in this BOM part of the scripts. Markus Wichitill <[EMAIL PROTECTED]> has 
recommended to use popular shareware editor UltraEdit, which has two .ini 
options that prevent the adding of UTF-8 BOMs.

To those interested I put a more detailed error report which appeared in the 
log after I added 

use Carp;
$SIG{__DIE__} = \&Carp::confess;

to my startup.pl file, as had been recommended by Stas Bekman <[EMAIL 
PROTECTED]>

[error] 2092: ModPerl::PerlRun: Unrecognized character \xEF at 
C:/shttps/CGI-FRLS/METSA/GET_LIST.PL line 1.
        eval 'package 
ModPerl::ROOT::ModPerl::PerlRun::C_3a_shttps_CGI_2dFRLS_METSA_GET_LIST_2ePL;sub 
handler {local $0 = \'C:/shttps/CGI-FRLS/METSA/GET_LIST.PL\';
#line 1 C:/shttps/CGI-FRLS/METSA/GET_LIST.PL
&#65279;use utf8;
binmode(STDOUT, ":raw:utf8");
print "Content-Type: text/html\\n\\n";
print "hello";
}
;' called at C:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 665
        ModPerl::RegistryCooker::compile('ModPerl::PerlRun=HASH(0x6c3384)', 
'SCALAR(0x7c8388)') called at 
C:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 374
        
ModPerl::RegistryCooker::convert_script_to_compiled_handler('ModPerl::PerlRun=HASH(0x6c3384)')
 called at C:/Perl/site/lib/Apache2/ModPerl/RegistryCooker.pm line 145
        
ModPerl::RegistryCooker::default_handler('ModPerl::PerlRun=HASH(0x6c3384)') 
called at C:/Perl/site/lib/Apache2/ModPerl/PerlRun.pm line 16
        ModPerl::PerlRun::handler('ModPerl::PerlRun', 
'Apache::RequestRec=SCALAR(0x6c32b8)') called at 
C:/shttps/CGI-FRLS/METSA/GET_LIST.PL line 1
        eval {...} called at C:/shttps/CGI-FRLS/METSA/GET_LIST.PL line 1

Terminating on signal SIGTERM(15)

Attached please find a sample of a BOMed script.

Please feel free to report the error/fix suggestion to the developers of the 
corresponding modules. I believe you will be able to do it much more 
professionally than me ;-)

Thanks again for your help!

Igor K.

-----Original Message-----
From: Markus Wichitill <[EMAIL PROTECTED]>
To: Igor Kudashev<[EMAIL PROTECTED]>
Date: Sun, 07 Nov 2004 16:37:59 +0100
Subject: Re: [mp2] "Unrecognized character" error when running scripts inutf-8

> 
> Igor Kudashev wrote:
> > 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.
> 
> Looks like the various ModPerl::RegistryCooker-based modules don't like a 
> UTF-8 Byte Order Marker (BOM, "EF BB BF") at the start of the script 
> (verified with 1.99_17). So until that can be fixed in a future version, 
> you'll have to use an editor that can save files without a BOM, or remove 
> those three bytes manually.
> 

Attachment: test.pl
Description: Binary data

-- 
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
  • ... Игорь Кудашев
    • ... Stas Bekman

Reply via email to