André Warnier wrote:
PerlResponseHandler AM::TestStuff->handler
and
sub handler {
my ($self,$r) = @_;
$r->print('$self is a [' . ref($self) . '] and contains [' . $self .
"]\n");
[...]
and the result is
$self is a [] and contains [AM::TestStuff]
doesn't seem to be an object.
I get the
John,
It does not look as if what you write below is true though.
I just tested with
PerlResponseHandler AM::TestStuff->handler
and
sub handler {
my ($self,$r) = @_;
$r->print('$self is a [' . ref($self) . '] and contains [' . $self .
"]\n");
[...]
and the result is
$self is a [] and con
Good suggestion. It looks like that works for my simple open() example
but unfortunately it doesn't work when reading from sockets. What I am
trying to do is tell Perl that all incoming POST data is UTF-8 encoded
and flag it as such. The $r->read() call unfortunately doesn't abide
by the open pragm
André Warnier wrote:
One more thing to try : doing a
use open ':utf8';
in the global mod_perl startup script.
well, that works.
Rob, that should probably help you.
The difference with PERL_UNICODE "SAD" seems to be that it will not
automatically consider @ARGV as utf-8.
Rob French wrot
And I think PerlSetEnv would not work anyway.
It will set PERL_UNICODE in time for the handler/script to print it, but
probably too late for Perl to take it into account, since by that time
the Perl interpreter is already up and running, so the internal
$^UNICODE variable is already set since a
Setting the environment variable has always worked. mod_perl can "see"
the PERL_UNICODE variable is set based on the fact that the
${^UNICODE} variable is returning 63 (SDA). The problem is that it
seems to ignore it.
On Wed, Mar 19, 2008 at 12:01 PM, Dondi Stroma <[EMAIL PROTECTED]> wrote:
> Mayb
Maybe you need to use PerlSetEnv ?
- Original Message -
From: "Rob French" <[EMAIL PROTECTED]>
To: "André Warnier" <[EMAIL PROTECTED]>
Cc:
Sent: Wednesday, March 19, 2008 2:41 PM
Subject: Re: [mp1] Can't get UTF8 input streams to automatically be decoded
using PERL_UNICODE under mod_p
John ORourke wrote:
The only down-side is that (AFAICR) it is creating a new object for each
request - my handler is quite expensive to set up, so I have a
persistent object and use method handlers like this:
Ah, that's quite neat. I might give that a shot.
Thanks for the suggestion.
Colin
André Warnier wrote:
In a similat setup, I successfuly use
my ($self, $r) = @_;
Colin Wetherbee wrote:
PerlAccessHandler JetSet::Handler->AccessHandler
PerlResponseHandler JetSet::Handler->ResponseHandler
The only down-side is that (AFAICR) it is creating a new object for each
request - my h
I have tried setting it via Apache SetEnv directive as well as in my
environment as root when starting Apache. In both cases the variable
is correctly set in mod_perl it is just ignored.
As another test I tried the same code as a plain ol' CGI script and it
works in that case. So the issue is defi
André Warnier wrote:
In a similat setup, I successfuly use
my ($self, $r) = @_;
so, if the undef bothers you ..
:)
Do you actually use $self for anything?
Colin
Hi.
I cannot really think of a reason why Perl itself would do something
different in either case. And in your tests, it was verified that
PERL_UNICODE itself is still set right under mod_perl. So it must be
that mod_perl somehow overrides the basic Perl setting. Maybe mod_perl
needs to do som
In a similat setup, I successfuly use
my ($self, $r) = @_;
so, if the undef bothers you ..
;-)
Colin Wetherbee wrote:
Greetings.
In order to have many handlers in a file, I've put the following lines
and other, similar lines in my virtual host configuration:
PerlAccessHandler JetSet::Handle
Greetings.
In order to have many handlers in a file, I've put the following lines
and other, similar lines in my virtual host configuration:
PerlAccessHandler JetSet::Handler->AccessHandler
PerlResponseHandler JetSet::Handler->ResponseHandler
Then, my handlers look like this:
sub ResponseHan
Hi André,
Yes, I tried that as well and it worked as expected (UTF-8 flag is
set). Explicit PerlIO layer decoding works in both the non-mod_perl
and mod_perl tests. It seems only the default PERL_UNICODE setting is
ignored in mod_perl even though it is set.
Rgrds,
Rob
On Wed, Mar 19, 2008 at 3:0
I think that these things can get very confused and confusing very
quickly, unless one steps through them one step at a time.
Let me try a first iteration :
1) URI's, as sent to the HTTP server, should contain only US-ASCII
characters (and no spaces). If there are other characters, they shou
Geoffrey Young wrote:
John ORourke wrote:
Eli Shemer wrote:
For some reason the following test doesn’t print anything out to the
screen
I'm not sure why you get nothing, but I can tell you strings read
from Apache objects come through as octets and need to be decoded
before use. We're usi
On Wed 19 Mar 2008, Eli Shemer wrote:
> For some reason the following test doesn’t print anything out to the screen
>
> Do I need to change something in the apache configuration, or mod_perl’s ?
>
>
>
> /articles_read.pl?id=חוזרת
This is probably a bug in libapreq2. I have tried this handler:
s
John ORourke wrote:
Eli Shemer wrote:
For some reason the following test doesn’t print anything out to the
screen
Do I need to change something in the apache configuration, or
mod_perl’s ?
/articles_read.pl?id=חוזרת
## get http parameters
$r = shift;
$apr = Apache2::Request->
From a previous message by Adam Prime in this same list :
[...]
SetHandler modperl doesn't bind 'print' to '$r->print'. Try SetHandler
perl-script, or change your code to pass in the request object and use
$r->print instead of print.
[...]
or, more verbously and explicitly :
if in your Apache
Eli Shemer wrote:
For some reason the following test doesn’t print anything out to the
screen
Do I need to change something in the apache configuration, or mod_perl’s ?
/articles_read.pl?id=חוזרת
## get http parameters
$r = shift;
$apr = Apache2::Request->new($r);
print $apr->pa
Hey there
For some reason the following test doesn’t print anything out to the screen
Do I need to change something in the apache configuration, or mod_perl’s ?
/articles_read.pl?id=חוזרת
## get http parameters
$r = shift;
$apr = Apache2::Request->new($r);
print $apr->param('id');
Hi.
Perl's handling of Unicode (and of character sets in general) is
extremely clever and powerful.
But it can sometimes be a bit counter-intuitive.
In any case, it seems to me that the evaluation of the PERL_UNICODE
environment variable is a "Perl thing" rather than a "mod_perl thing",
and
I have recently started converting one of our webapps to make it fully
UTF-8 compliant. All input/output from the webapp will be encoded as
UTF-8. As such, I am trying to use the PERL_UNICODE env variable to
enable UTF-8 flagging on all input/output streams. This works with
standalone Perl scripts
24 matches
Mail list logo