X-Git-Url: https://git.dogcows.com/gitweb?p=chaz%2Fgit-codeowners;a=blobdiff_plain;f=lib%2FApp%2FCodeowners%2FOptions.pm;h=154b09894fd92a793f10654d977575b11221d09a;hp=3c1eb1d26381717147eeb3dcd833c324989ee152;hb=1c893b7e095fdaffdf47ffee426407a1f7e305fb;hpb=394cf108a349a62a3ae7a5d0137b9c8a90faac5b diff --git a/lib/App/Codeowners/Options.pm b/lib/App/Codeowners/Options.pm index 3c1eb1d..154b098 100644 --- a/lib/App/Codeowners/Options.pm +++ b/lib/App/Codeowners/Options.pm @@ -5,6 +5,7 @@ use v5.10.1; use warnings; use strict; +use Encode qw(decode); use Getopt::Long 2.39 (); use Path::Tiny; @@ -82,6 +83,9 @@ sub new { my $class = shift; my @args = @_; + # assume UTF-8 args if non-ASCII + @args = map { decode('UTF-8', $_) } @args if grep { /\P{ASCII}/ } @args; + my $self = bless {}, $class; my @args_copy = @args;