App-zipdetails
view release on metacpan or search on metacpan
### Filenames & Comments
Filenames and comments are decoded/encoded using the default system
encoding of the host running `zipdetails`. When the sytem encoding cannot
be determined `cp437` will be used.
The exceptions are
- when the `Language Encoding Flag` is set in the zip file, the
filename/comment fields are assumed to be encoded in UTF-8.
- the definition for the metadata field implies UTF-8 charset encoding
See ["Filename Encoding Issues"](#filename-encoding-issues) and ["Filename & Comment Encoding
Options"](#filename-comment-encoding-options) for ways to control the encoding of filename/comment fields.
## OPTIONS
### General Options
- `-h`, `--help`
bin/zipdetails view on Meta::CPAN
if (! defined $enc)
{
eval
{
require encoding ;
my $encoding = encoding::_get_locale_encoding() ;
if (! $encoding)
{
# CP437 is the legacy default for zip files
$encoding = 'cp437';
# ::warning undef, "Cannot determine system charset: defaulting to '$encoding'"
}
$enc = Encode::find_encoding($encoding) ;
} ;
}
return $enc;
}
sub getNativeLocaleName
{
bin/zipdetails view on Meta::CPAN
=over 5
=item *
when the C<Language Encoding Flag> is set in the zip file, the
filename/comment fields are assumed to be encoded in UTF-8.
=item *
the definition for the metadata field implies UTF-8 charset encoding
=back
See L<"Filename Encoding Issues"> and L<Filename & Comment Encoding
Options> for ways to control the encoding of filename/comment fields.
=head2 OPTIONS
=head3 General Options
t/002-main.t view on Meta::CPAN
$string = $1;
}
# warn "GOT [$Perl][$]][$string]\n";
return $string ;
}
sub zapGolden
{
my $locale_charset = getNativeLocale();
$_[0] =~ s<^(#\s*System Default Encoding:\s*)('.+?')><$1'$locale_charset'>mg ;
# # Encode changed from using utf8 to UTF-8 at some point
my $UTF = getUTF8String();
$_[0] =~ s<\S+ (\S+) does not map to Unicode><$UTF $1 does not map to Unicode>g ;
}
( run in 0.307 second using v1.01-cache-2.11-cpan-4d50c553e7e )