in reply to Re^2: How do I convince my Perl script that UTF-8 from an HTML form really is UTF-8?
in thread [SOLVED] How do I convince my Perl script that UTF-8 from an HTML form really is UTF-8?
The server had already added the UTF-8 content type in the HTTP headers
Could you please elaborate which server you are using, and how you configure it to modify the content type of a CGI script? You could also verify in your browser which encoding it uses for your text/plain response.
I also had a look at the source of CGI::Simple and found out:
use strict; use warnings; use CGI::Simple; $CGI::Simple::PARAM_UTF8 = 1; my $q = CGI::Simple->new(); $q->charset('utf-8'); binmode STDOUT,':encoding(UTF-8)'; print $q->header(-type => 'text/plain'); print $q->param('text'),"\n";
|
|---|