New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Silent encoding of filenames with UTF8 flag set #15305
Comments
From @hakonhaglandAccording to perldoc "perlunicode", section: "When Unicode Does Not Happen" https://metacpan.org/pod/distribution/perl/pod/perlunicode.pod#When-Unicode-Does-Not-Happen Site: "There are still many places where Unicode (in some encoding or Then a set of interfaces are listed, including system() and mkdir(), where Still, it is my experience that the above statement is not strictly use strict; # This sets the UTF8 flag on $str due to "use utf8" pragma and makes $str # This clears the UTF8 flag on $str_utf8, makes it a binary string # Argument to system(), UTF8 flag is set for $arg due to interpolation of # system() scilently encodes $arg as UTF8 # Argument to system(), UTF8 flag is not set for $arg2 # system() does nothing with $str_utf8 (since it has no UTF8 flag set) The output of the above script is: 00000000 c3 a5 |..| Which confirms that $arg was silently encoded as UTF8 before passed to 1. Always encode explicitly arguments passed to system(), mkdir(), chdir(), If 2) is the recommendation, then perhaps it should be documented somewhere Best regards, |
From @iabynOn Fri, May 06, 2016 at 08:27:18AM -0700, Håkon Hægland wrote:
Perl's system() etc do not do any form of encoding - they just pass the $s = "\x80"; outputs: 00000000 80 0a while uncommenting the utf8::upgrade gives: 00000000 c2 80 0a -- |
The RT System itself - Status changed from 'new' to 'open' |
Migrated from rt.perl.org#128083 (status was 'open')
Searchable as RT128083$
The text was updated successfully, but these errors were encountered: