On Sat, May 15, 2010 at 10:52 AM, Eric Brine <ikegami@adaelis.com> wrote: >> # New Ticket Created by "Tatsuhiko Miyagawa" >> # Please include the string: [perl #75106] >> # in the subject line of all future correspondence about this issue. >> # <URL: http://rt.perl.org/rt3/Ticket/Display.html?id=75106 > >> >> >> The following test fails on win32 systems on perl 5.8.9, 5.10.1 and >> 5.12.0, whereas it passes fine on other systems like Linux or Mac OS >> X. It looks like binmode $t, ":raw" doesn't have any effect of taking >> away ":utf8". Per my discussion with jdb at #p5p, i'm filing a bug >> report. >> > > As a workaround, change > > binmode $t, ":utf8"; > > to > > binmode $t, ":encoding(UTF-8)"; No, I can't. This the core of CGI-to-PSGI automatic conversion, and my module (CGI::Emulate::PSGI) runs *someone else's* (i.e. users of this module) code that touches STDOUT, including the common idiom binmode STDOUT, ':utf8'; My code is a caller of CGI application, and what it does is to swap STDOUT handle to the tempfile, run the existing CGI code, and then undo/revert whatever perlio layer changes with binmode $h, ':raw'; Requiring the change for existing code is not an acceptable workaround. (Yes, I understand that this is a rare requirement) -- Tatsuhiko MiyagawaThread Previous | Thread Next