Skip Menu |

This queue is for tickets about the CGI-SSI CPAN distribution.

Report information
The Basics
Id: 121250
Status: new
Priority: 0/
Queue: CGI-SSI

Owner: Nobody in particular
Requestors: tristan [...]

Bug Information
Severity: (no value)
Broken in: (no value)
Fixed in: (no value)

Subject: CGI::SSI breaks when STDOUT is configured for utf8 using "binmode(STDOUT, ":utf8");"
Date: Wed, 19 Apr 2017 16:05:06 -0700
To: bug-CGI-SSI [...]
From: Tristan Savatier <tristan [...]>
Download (untitled) / with headers
text/plain 926b
hi, CGI::SSI breaks when STDOUT is configured for utf8 using "binmode(STDOUT, ":utf8");" test case: ============================================================= use CGI::SSI; $ssi = CGI::SSI->new(); $ssi = tie(*STDOUT, 'CGI::SSI', filehandle => 'STDOUT'); $ssi->set(varname => 1); binmode(STDOUT, ":utf8"); print '<!--#if expr="$varname" -->ok<!--#else -->nope<!--#endif -->' . "\n"; print '<!--#if expr="$varname2" -->ok<!--#else -->nope<!--#endif -->' . "\n"; ============================================================= this produces the error: Failed to copy the filehandle (main::STDOUT): Bad file descriptor at /usr/local/share/perl5/CGI/ line 81. if you comment-out the "binmode" line, the test works fine and prints ok nope versions: CGI:SSI 0.92 perl v5.10.1 (*) built for x86_64-linux-thread-multi Linux 2.6.32-042stab120.5 #1 SMP Tue Oct 25 22:31:12 MSK 2016 x86_64 x86_64 x86_64 GNU/Linux -t

This service is sponsored and maintained by Best Practical Solutions and runs on infrastructure.

Please report any issues with to