[Expat-bugs] Only in mod_perl

rwk@americom.com rwk@americom.com
28 Dec 2000 02:59:47 -0700


I have encountered a situation which fails only when running in Apache
mod_perl.

I am trying to use the original_string() method, and when I run the
program outside mod_perl, it works flawlessly.  However, when the same
code is run inside mod_perl, original_string() returns a null string,
even when the "chars" argument *does* include the UTF8 encoded string.

In addition, when I remove the call to original_string() from the char
handler, it works inside and outside mod_perl.

I.e.:

# works in and out of mod_perl
sub XMLDecoder::Characters { 
    my $xp = shift;  my $chars = shift;
    print $chars;
}

# always prints '' in mod_perl but works fine outside mod_perl
sub XMLDecoder::Characters { 
    my $xp = shift;  my $chars = $xp->original_string;
    print $chars;
}

Thanks for any help,
Dick Kreutzer
AmeriCom Inc.