Howdy,
I am working on moving our web site to be fully Unicode functional.
One of the bits I've been trying to wrangle is to set the "utf8" flag
on incoming HTTP attributes.
For example, if I have the URL:
http://example.com/login/?code=entr%C3%A9
I get back
$ARGS{'code'} = "entré"
Which is fine and good.
However,
utf8::is_utf8($ARGS{'code'})
is false, hence preventing some utf8 manipulation recognition when
calling other methods/Perl functions/etc.
I stumbled across Apache::Request::I18N which seems to fit the bill;
it parses and sets the utf8 "flag" on all incoming parameters;
everything works nicely.
Except for subrequested POST requests ... when all the params seem to
get lost.
For example, if I don't have a dhandler for /login/ but do have a
file /login/index.html, then:
1. Browser requests (with posted variables) http://example.com/login/
2. Apache creates $r, I set up $r using an Apache::Request::I18N-
>instance() call in my Mason handler which gets ultimately passed to
HTML::Mason::ApacheHandler::handle_request()
3. H::M::AH::handle_request returns -1, so then:
4. Apache does an internal redirect and retries with the url http://
example.com/login/index.html
5. The parameters aren't seen by Apache::Request::I18N on the sub
request (which I can verify by investigating the $r)
6. Mason is invoked, but none of the POST $ARGS{} are present.
It seems Apache::Request::I18N is a fairly new module, so I'm sure it
might be a problem with it not "looking" for things in the right
place after an internal redirect (GETs work fine, as do POSTs that
aren't internally subrequested).
I'm happy to provide code/examples/post to a more appropriate list,
just wondering if anyone has experienced similar issues.
--- OR ---
Is there a more preferred way to ensure that incoming $ARGS{} have
their is_utf8() "flag" set?
Any insight appreciated, thanks,
-Michael
_______________________________________________________
Michael Burns
Cosbit Technologies
403-701-2672 / [EMAIL PROTECTED]
AIM: cmikeburns
MSN: cmikeburns
_______________________________________________________
Box 2173, Station M • Calgary, Alberta, Canada • T2P 2M4
http://cosbit.com
-------------------------------------------------------
All the advantages of Linux Managed Hosting--Without the Cost and Risk!
Fully trained technicians. The highest number of Red Hat certifications in
the hosting industry. Fanatical Support. Click to learn more
http://sel.as-us.falkag.net/sel?cmd=lnk&kid7521&bid$8729&dat1642
_______________________________________________
Mason-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/mason-users