Join GitHub today
GitHub is home to over 50 million developers working together to host and review code, manage projects, and build software together.Sign up
Taint mode still breaks utf8 handling #8114
Created by firstname.lastname@example.org
I'm in the process of "porting" a perl web app (fastcgi, running with
I first had problems with 5.8.4: when I read in a block of data using
gave a $str which still had the utf8 byte sequences as characters
(I'm actually using my own wrappers around open and read, so I didn't
I did narrow those down to the usage of the -T flag. I found that one
- switching off tainting mode
"Fine, it has been fixed" I thought.
But now I realized that something else still doesn't work under taint
(What I'm doing is, I write a list of strings to one file, first
my $d= [ list of strings or string refs ];
The problem is that sometimes Encode::is_utf8 reports false on a
- the file being written to disk *does* contain utf8 sequences.
As I said, again switching off taint mode seems to make it work fine.
Thanks for your works,
Christian and Porters,
Thanks for your report.
On Sep 15, 2005, at 18:53 , Christian Jaeger (via RT) wrote:
I could not duplicate the symptom on perl 5.8.7 but on 5.8.6 I did.
you run the code as follows (on my Mac OS X v10.4.2);
As you see, on 5.8.6 utf8::is_utf8() works fine while Encode::is_utf8
/* universal.c */
/* ext/Encode/Encode.xs */
/* end of code */
Though not harmful, the behavior of 5.8.7 is not as documented as in
Dan the Encode Maintainer
Thanks for your reply.
At 5:29 Uhr -0700 15.09.2005, Dan Kogai via RT wrote:
With my perl 5.8.7 I'm getting:
(thus the same as you with that version)
Interesting, I will try my app with -T again with utf8::is_utf8.
yes, but that's fine for me.
Your test case can't explain the second mentioned problem I'm seeing
One thing to note: I'm not opening files with ">:utf8" or "<:raw", but:
That's the reason why I'm toggling off the utf8 flag of strings which