diff --git a/bin/metabase-profile b/bin/metabase-profile index d816cd3..e6d19c5 100644 --- a/bin/metabase-profile +++ b/bin/metabase-profile @@ -15,6 +15,9 @@ use Metabase::User::Profile; use Metabase::User::Secret; use Pod::Usage; use IO::Prompt::Tiny qw(prompt); +use Encode qw(decode_utf8); + +@ARGV = map { decode_utf8($_, 1) } @ARGV; my ( %profile, $help, $output, $full_name, $email_address, $password ); my $result = GetOptions( @@ -65,7 +68,7 @@ my $secret = Metabase::User::Secret->new( print "Writing profile to '$output'\n"; open my $fh, ">", $output; print {$fh} - JSON::MaybeXS->new(ascii => 1, pretty => 1)->encode( [ $profile->as_struct, $secret->as_struct, ] ); + JSON::MaybeXS->new(ascii => 1, pretty => 1, utf8 => 1)->encode( [ $profile->as_struct, $secret->as_struct, ] ); close $fh; chmod 0600, $output;