isync has asked for the wisdom of the Perl Monks concerning the following question:
Monks,
I am in deep trouble here and are pulling my hair out.
I am trying to implement a web application that cleanly operates in utf8 with CGI::Application. Is it possible?
That's where I am:
update: I spawned another thread, as the fileupload problem seems to be losely connected to this problem.
I am in deep trouble here and are pulling my hair out.
I am trying to implement a web application that cleanly operates in utf8 with CGI::Application. Is it possible?
That's where I am:
- my code is in utf8: use utf8; at the beginning of application.cgi and all modules.
-
* a sidenote- I use
to enable fastcgi in my application.cgiuse CGI::Fast(); -
*in an act of helplessness is i added
to application.cgi, without really knowing what it does (and actually it seems to do nothing.use open ':utf8'; use open ':std'; -
*in Application.pm I add $self->header_add(-charset => 'utf-8'); in setup { }
-
*after serious trouble with my MySQL data (where I set everything to utf8: db, connnection etc. see this thread) I found out that my perl script only outputs this data to display correctly in the browser with
, actually I think that this only works on my linux browser environment, I saw a hint of malfunction on Windows... esoteric.my $flagOn = $html->output; Encode::_utf8_on($flagOn); return $flagOn; - *finally file uploads came into play. That's when I dropped my conversion layer module for all param-stuff and began to manually add my $param_f = decode("utf8", $q->param("f") );to all my subroutines. Now - occasionally! (which it also does under simple cgi not fast cgi operation and seems to be connected to overall load) - my upload crashes with CGI.pm (version 3.33) throwing things like "Malformed UTF-8 character (unexpected non-continuation byte 0xd9, 1 byte after start byte 0xee, expected 3 bytes) in index at (eval 139) line 15." in apache's error.log and to the browser via Carp "CGI.pm: Server closed socket during multipart read (client aborted?)."... last idea: apache or my script?
update: I spawned another thread, as the fileupload problem seems to be losely connected to this problem.
|
---|
Back to
Seekers of Perl Wisdom