aboutsummaryrefslogtreecommitdiffstats
path: root/commonlib
diff options
context:
space:
mode:
authorMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-03 19:08:19 +0000
committerMatthew Somerville <matthew@fury.ukcod.org.uk>2011-03-03 19:08:19 +0000
commitf697c88f46b7cf100e64e37c532e2a842b15dc6e (patch)
treedce1842c5bd61f64c93cad381b1d60e09cf97ef4 /commonlib
parent8033a55579ccecb92c781528fdeebd666f077978 (diff)
binmode is ignored by FastCGI. This didn't matter on lenny, where FCGI.pm 0.67 happily prints out Unicode strings as UTF-8 (the internal encoding). This was reported as a bug (rt.cpan.org #52400), and FCGI.pm version 0.69 (and thus 0.71 as present on squeeze) changed to call downgrade() on incoming Unicode strings, meaning the output becomes either Latin-1 (or EBCDIC), or a croak due to a Unicode character not fitting into that. The old behaviour of FCGI seemed perfectly acceptable to me when it was given characters, not bytes, and I'm not sure why the change was made - certainly downgrade() seems a bad choice given it could be any Unicode string passed in, I'd have gone with encode() (which would be the old behaviour still). Anyway, we redirect STDOUT to a string, capture it, and then print out the Unicode string (everything internal should be Unicode strings) manually encoded to UTF-8. This should work in CGI, or pre/post 0.69 FastCGI.
Diffstat (limited to 'commonlib')
0 files changed, 0 insertions, 0 deletions