[mp1] binmode(STDOUT, ':utf8') fails silently
[prev]
[thread]
[next]
[Date index for 2005/05/05]
Hi, I'm trying to set binmode(STDOUT, ':utf8') from within a PerlRun script (mod_perl 1.29, apache
1.3.29, perl 5.8.6), and it's failing (returning undef) without setting $!, as the docs claim it
should.
I really shouldn't even have to do this at all, since I'm already setting
Content-type: text/html; charset=UTF-8
as the header,
<?xml version="1.0" encoding="UTF-8"?>
at the start of the document AND, just to be thorough,
<meta http-equiv="Content-type" content="text/html; charset=UTF-8"/>
in the <head> section of all my generated HTML. When I invoke my script at the command line, the
output shows up in the terminal with the proper unicode characters. Málaga is Málaga. But the same
script, when run by mod_perl, sends "Málaga" to the browser instead. Why is this, and why is it
that the only obvious workaround, binmode(), has decided to quietly quit? (and yes, I'm setting
binmode() before using print() for for the first time).
Let me know if that's not enough information. Unfortunately I cannot post the entire script in a
public forum.
 |
[mp1] binmode(STDOUT, ':utf8') fails silently
Brian Dimeler 18:15 on 05 May 2005
|