Skip Menu |

Preferred bug tracker

Please visit the preferred bug tracker to report your issue.

This queue is for tickets about the Sys-Cmd CPAN distribution.

Report information
The Basics
Id: 81834
Status: resolved
Priority: 0/
Queue: Sys-Cmd

People
Owner: Nobody in particular
Requestors: SAPER [...] cpan.org
Cc:
AdminCc:

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



Subject: Unicode text get mangled
Hello, While trying to install Sys::Cmd, the tests failed with the following errors: $ prove -lv t/10-command.t t/10-command.t .. 1..93 ok 1 - The object isa Sys::Cmd ok 2 - The object isa GLOB ok 3 - stdin opened ok 4 - The object isa GLOB ok 5 - stdout opened ok 6 - The object isa GLOB ok 7 - stderr opened ok 8 - cmdline ok 9 - no errput not ok 10 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 11 - exit 0 ok 12 - no signal received ok 13 - no core dumped ok 14 - The object isa Sys::Cmd ok 15 - The object isa GLOB ok 16 - stdin opened ok 17 - The object isa GLOB ok 18 - stdout opened ok 19 - The object isa GLOB ok 20 - stderr opened ok 21 - cmdline ok 22 - no errput not ok 23 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 24 - exit 0 ok 25 - no signal received ok 26 - no core dumped ok 27 - The object isa Sys::Cmd ok 28 - The object isa GLOB ok 29 - stdin opened ok 30 - The object isa GLOB ok 31 - stdout opened ok 32 - The object isa GLOB ok 33 - stderr opened ok 34 - cmdline ok 35 - no errput not ok 36 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 37 - exit 0 ok 38 - no signal received ok 39 - no core dumped ok 40 - The object isa Sys::Cmd ok 41 - The object isa GLOB ok 42 - stdin opened ok 43 - The object isa GLOB ok 44 - stdout opened ok 45 - The object isa GLOB ok 46 - stderr opened ok 47 - cmdline ok 48 - no errput not ok 49 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 50 - exit 0 ok 51 - no signal received ok 52 - no core dumped ok 53 - The object isa Sys::Cmd ok 54 - The object isa GLOB ok 55 - stdin opened ok 56 - The object isa GLOB ok 57 - stdout opened ok 58 - The object isa GLOB ok 59 - stderr opened ok 60 - cmdline ok 61 - no errput not ok 62 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 63 - exit 0 ok 64 - no signal received ok 65 - no core dumped ok 66 - The object isa Sys::Cmd ok 67 - The object isa GLOB ok 68 - stdin not opened ok 69 - The object isa GLOB ok 70 - stdout opened ok 71 - The object isa GLOB ok 72 - stderr opened ok 73 - cmdline ok 74 - no errput not ok 75 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 76 - exit 0 ok 77 - no signal received ok 78 - no core dumped ok 79 - The object isa Sys::Cmd ok 80 - The object isa GLOB ok 81 - stdin not opened ok 82 - The object isa GLOB ok 83 - stdout opened ok 84 - The object isa GLOB ok 85 - stderr opened ok 86 - cmdline ok 87 - no errput not ok 88 - perl t/info.pl # Failed test 'perl t/info.pl' # at t/10-command.t line 137. # Structures begin differing at: # $got->{env}{ITERM_PROFILE} = 'D?faut' # $expected->{env}{ITERM_PROFILE} = 'Défaut' ok 89 - exit 0 ok 90 - no signal received ok 91 - no core dumped ok 92 - command failed: ok 93 - ... expected error message # Looks like you failed 7 tests of 93. Dubious, test returned 7 (wstat 1792, 0x700) Failed 7/93 subtests Test Summary Report ------------------- t/10-command.t (Wstat: 1792 Tests: 93 Failed: 7) Failed tests: 10, 23, 36, 49, 62, 75, 88 Non-zero exit status: 7 Files=1, Tests=93, 0 wallclock secs ( 0.03 usr 0.01 sys + 0.19 cusr 0.06 csys = 0.29 CPU) Result: FAIL The reason is that the environment variable ITERM_DEFAULT contains the name of the default profile, which is in French "Défaut". However, it looks like the string gets somehow mangled by Sys::Cmd. I took a quick look in the source, but saw no obvious flaw. I'll see if I can give a better look later. -- Close the world, txEn eht nepO.
Le 2012-12-09 12:42:57, SAPER a écrit : Show quoted text
> The reason is that the environment variable ITERM_DEFAULT contains the > name of the default > profile, which is in French "Défaut". However, it looks like the > string gets somehow mangled by > Sys::Cmd. > > I took a quick look in the source, but saw no obvious flaw.
Probably an encoding issue. Could you report your locale and the encoding of the ITERM_DEFAULT variable? -- Olivier Mengué - http://perlresume.org/DOLMEN
Subject: Re: [rt.cpan.org #81834] Unicode text get mangled
Date: Sun, 9 Dec 2012 23:10:16 +0100
To: bug-Sys-Cmd [...] rt.cpan.org
From: Sébastien Aperghis-Tramoni <SAPER [...] cpan.org>
Olivier Mengué wrote via RT: Show quoted text
> Probably an encoding issue. > Could you report your locale and the encoding of the ITERM_DEFAULT variable?
iTerm2 v1.0.0.20120203, configured in Unicode (UTF-8) LANG=fr_FR.UTF-8 ITERM_PROFILE=Défaut -- Sébastien Aperghis-Tramoni Close the world, txEn eht nepO.
Subject: Re: [rt.cpan.org #81834] Unicode text get mangled
Date: Sun, 24 Feb 2013 14:11:59 +1300
To: Sébastien Aperghis-Tramoni via RT <bug-Sys-Cmd [...] rt.cpan.org>
From: Mark Lawrence <nomad [...] null.net>
Thanks Sébastien for your report. Show quoted text
> # Failed test 'perl t/info.pl' > # at t/10-command.t line 137. > # Structures begin differing at: > # $got->{env}{ITERM_PROFILE} = 'D?faut' > # $expected->{env}{ITERM_PROFILE} = 'Défaut'
This turned out to not be a problem with Sys::Cmd, but with the t/info.pl test script which was not setting the encoding of STDOUT to handle UTF-8. The latest development (github 'devel' branch) version of Sys-Cmd has a fix, which I will run past CPANTesters and upload to CPAN this week. Mark. -- Mark Lawrence