view release on metacpan or search on metacpan
inc/YAML/Tiny.pm view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm view on Meta::CPAN
onerror => $_[3] || sub {},
#onerror_set
};
if ($csdef->{uri}->{$XML_AUTO_CHARSET} or
$obj->{charset} eq $XML_AUTO_CHARSET) {
my $b = ''; # UTF-8 w/o BOM
$csdef = $HTML::HTML5::Parser::Charset::CharsetDef->{$PERL_CHARSET.'utf-8'};
$obj->{input_encoding} = 'UTF-8';
if (read $obj->{filehandle}, $b, 256) {
no warnings "substr";
no warnings "uninitialized";
lib/HTML/HTML5/Parser/Charset/DecodeHandle.pm view on Meta::CPAN
# \x4C\x6F\xA7\x94 EBCDIC
} # buffer
$obj->{byte_buffer} .= $b;
} # read
} elsif ($csdef->{uri}->{$XML_CHARSET.'utf-8'}) {
## BOM is optional.
my $b = '';
if (read $obj->{filehandle}, $b, 3) {
if ($b eq "\xEF\xBB\xBF") {
$obj->{has_bom} = 1;
} else {
$obj->{byte_buffer} .= $b;
}
}
$csdef = $HTML::HTML5::Parser::Charset::CharsetDef->{$PERL_CHARSET.'utf-8'}; # UTF-8 w/o BOM
} elsif ($csdef->{uri}->{$XML_CHARSET.'utf-16'}) {
## BOM is mandated.
my $b = '';
if (read $obj->{filehandle}, $b, 2) {
if ($b eq "\xFE\xFF") {
$obj->{has_bom} = 1; # UTF-16BE w/o BOM
$csdef = $HTML::HTML5::Parser::Charset::CharsetDef->{$PERL_CHARSET.'utf-16be'};
} elsif ($b eq "\xFF\xFE") {
$obj->{has_bom} = 1; # UTF-16LE w/o BOM
$csdef = $HTML::HTML5::Parser::Charset::CharsetDef->{$PERL_CHARSET.'utf-16le'};
} else {
$obj->{onerror}->(undef, 'no-bom-error', charset_uri => $obj->{charset});
$obj->{has_bom} = 0;
$obj->{byte_buffer} .= $b; # UTF-16BE w/o BOM
$csdef = $HTML::HTML5::Parser::Charset::CharsetDef->{$PERL_CHARSET.'utf-16be'};
}
} else {
$obj->{onerror}->(undef, 'no-bom-error', charset_uri => $obj->{charset});
$obj->{has_bom} = 0; # UTF-16BE w/o BOM
$csdef = $HTML::HTML5::Parser::Charset::CharsetDef->{$PERL_CHARSET.'utf-16be'};
}
}
if ($csdef->{uri}->{$XML_CHARSET.'iso-2022-jp'}) {
view all matches for this distribution
view release on metacpan or search on metacpan
inc/YAML/Tiny.pm view on Meta::CPAN
die \"Did not provide a string to load";
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
die \"Stream has a non UTF-8 BOM";
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/YAML/Tiny.pm view on Meta::CPAN
die \"Did not provide a string to load";
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
die \"Stream has a non UTF-8 BOM";
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
inc/YAML/Tiny.pm view on Meta::CPAN
die \"Did not provide a string to load";
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
die \"Stream has a non UTF-8 BOM";
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
Return: 1 (true) if encoding found, otherwise 0 (false)
=head3 encoding_detect_bom
Detect Unicode character encoding by BOM
Now available for detect UTF-8, UTF-16LE, UTF-16BE
# $text[in] text
# $out_encoding[out] detected encoding
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTML/HeadParser.pm view on Meta::CPAN
sub text
{
my($self, $text) = @_;
print "TEXT[$text]\n" if $DEBUG;
unless ($self->{first_chunk}) {
# drop Unicode BOM if found
if ($self->utf8_mode) {
$text =~ s/^\xEF\xBB\xBF//;
}
else {
$text =~ s/^\x{FEFF}//;
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/form_checksum.t view on Meta::CPAN
my $submit = Load($s_yaml);
chomp($output);
undef %HTML::Transmorgify::compiled;
my $res;
my $bomb = sub {
print STDERR "############################################ BOMB\n";
print STDERR "@_\n";
$onebad++;
local($HTML::Transmorgify::debug) = 1;
undef %HTML::Transmorgify::compiled;
pos($input) = 0;
view all matches for this distribution
view release on metacpan or search on metacpan
bind_match|5.003007||Viu
block_end|5.004000|5.004000|
block_gimme|5.004000|5.004000|u
blockhook_register|5.013003|5.013003|x
block_start|5.004000|5.004000|
BOM_UTF8|5.025005|5.003007|p
boolSV|5.004000|5.003007|p
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
_byte_dump_string|5.025006||cViu
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
inc/YAML/Tiny.pm view on Meta::CPAN
die \"Did not provide a string to load";
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
die \"Stream has a non UTF-8 BOM";
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
L<detect|/detect>
=back
Returns array with encoding id and new text without BOM, if success.
If fail, then encoding id equal HTML5::DOM::Encoding->NOT_DETERMINED.
my ($encoding_id, $new_text) = HTML5::DOM::Encoding::detectAuto("ололо");
my $encoding = HTML5::DOM::Encoding::id2name($encoding_id);
=head3 detectBomAndCut
my ($encoding_id, $new_text) = HTML5::DOM::Encoding::detectBomAndCut($text, $max_length = 0);
Returns array with encoding id and new text without BOM.
If fail, then encoding id equal HTML5::DOM::Encoding->NOT_DETERMINED.
my ($encoding_id, $new_text) = HTML5::DOM::Encoding::detectBomAndCut("\xEF\xBB\xBFололо");
my $encoding = HTML5::DOM::Encoding::id2name($encoding_id);
See L<detectByPrescanStream|/detectByPrescanStream>.
=head4 encoding_use_bom
Allow use detecding BOM to determine input HTML encoding. (default 1)
See L<detectBomAndCut|/detectBomAndCut>.
=head4 utf8
view all matches for this distribution
view release on metacpan or search on metacpan
inc/YAML/Tiny.pm view on Meta::CPAN
die \"Did not provide a string to load";
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
die \"Stream has a non UTF-8 BOM";
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Message.pm view on Meta::CPAN
}
# time to start guessing
my $cref = $self->decoded_content(ref => 1, charset => "none");
# Unicode BOM
for ($$cref) {
return "UTF-8" if /^\xEF\xBB\xBF/;
return "UTF-32LE" if /^\xFF\xFE\x00\x00/;
return "UTF-32BE" if /^\x00\x00\xFE\xFF/;
return "UTF-16LE" if /^\xFF\xFE/;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HTTP/Promise/Entity.pm view on Meta::CPAN
{
use strict;
use warnings;
warnings::register_categories( 'HTTP::Promise' );
use parent qw( Module::Generic );
use vars qw( $VERSION $EXCEPTION_CLASS $BOUNDARY_DELIMITER $BOM2ENC $ENC2BOM $BOM_RE
$BOM_MAX_LENGTH $DEFAULT_MIME_TYPE );
use Data::UUID;
use HTTP::Promise::Exception;
use HTTP::Promise::Headers;
use HTTP::Promise::Body;
use Module::Generic::HeaderValue;
lib/HTTP/Promise/Entity.pm view on Meta::CPAN
{
return( $charset );
}
$self->_load_class( 'Encode' ) || return( $self->pass_error );
unless( defined( $BOM2ENC ) && scalar( %$BOM2ENC ) )
{
# Credits: Matthew Lawrence (File::BOM)
our $BOM2ENC = +{
map{ Encode::encode( $_, "\x{feff}" ) => $_ } qw(
UTF-8
UTF-16BE
UTF-16LE
UTF-32BE
UTF-32LE
)
};
our $ENC2BOM = +{
reverse( %$BOM2ENC ),
map{ $_ => Encode::encode( $_, "\x{feff}" ) } qw(
UCS-2
iso-10646-1
utf8
)
};
my @boms = sort{ length( $b ) <=> length( $a ) } keys( %$BOM2ENC );
our $BOM_MAX_LENGTH = length( $boms[0] );
{
local $" = '|';
our $BOM_RE = qr/@boms/;
}
}
# time to start guessing
# If called from decoded_content, kind of pointless to call decoded_content again
lib/HTTP/Promise/Entity.pm view on Meta::CPAN
return( '' ) if( !$bytes );
$cref = \$buff;
}
# Is there a Byte Order Mark?
if( $$cref =~ /^($BOM_RE)/ )
{
my $bom = $1;
return( $BOM2ENC->{ $bom } );
}
# Unicode BOM
return( 'UTF-8' ) if( $$cref =~ /^\xEF\xBB\xBF/ );
return( 'UTF-32LE' ) if( $$cref =~ /^\xFF\xFE\x00\x00/ );
return( 'UTF-32BE' ) if( $$cref =~ /^\x00\x00\xFE\xFF/ );
return( 'UTF-16LE' ) if( $$cref =~ /^\xFF\xFE/ );
return( 'UTF-16BE' ) if( $$cref =~ /^\xFE\xFF/ );
view all matches for this distribution
view release on metacpan or search on metacpan
t/certs/dsa.pem view on Meta::CPAN
ENrIZk98f+ouGgMJfvydlzzJeOhxXqrseK/e2mHFdtQ6nvI+M3AHp7FMQqk4x1dy
useKMWX8d5KsUxn0WrUCmguYTQR08zS5Y9620bqHhyolKOQC/cOz/jODe488eHFq
xRQ4I1XZTuq3AvwDu2BpJSCSIiP/2ESjmyS36iRJ54MTifY52WO2AvSpPEwLJOXT
0XEJEj6G0Xb9EiTlPn3T2CgDwdZVH1Z1iOA7c9EfjgoUfZtq1nCIZirDbDV1gmux
8nXLCov8H8J3PINlQR/ANZpjPvg75iiu4EzTczi/m2W9l7Doof+gEGVOLo5vbVJF
39mkSML3hZqjUDBOMB0GA1UdDgQWBBSNfxR0ZfkpP9aNQVY1H0JgVxrqvDAfBgNV
HSMEGDAWgBSNfxR0ZfkpP9aNQVY1H0JgVxrqvDAMBgNVHRMEBTADAQH/MAsGCWCG
SAFlAwQDAgNIADBFAiA35H431lpZJIt+3y2KsxDvn/Yxyq16fCaLX0rdiXA4igIh
ALVfEbSGkVc4mpb76IAnqdTR02TfMjSiwH8dIBK4eNEE
-----END CERTIFICATE-----
view all matches for this distribution
view release on metacpan or search on metacpan
requires 'Test::Pod';
requires 'Test::NoTabs';
requires 'Test::Perl::Metrics::Lite';
requires 'Test::Vars';
requires 'File::Find::Rule::ConflictMarker';
requires 'File::Find::Rule::BOM';
};
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/HashData/CPAN/AuthorName/ByPAUSEID.pm view on Meta::CPAN
BOLEK:Boleslav Bobcik
BOLILA:Joao Bolila
BOLSANOV:Dmitry Bolsanov
BOLTE:Scott Bolte
BOLTZY:Mark Bolton
BOMB:Michael W. Bombardieri
BOMBARELY:Aureliano Bombarely
BOMBUP:no name
BONANZA:Paulo Dutra
BONAR:Nakano Kyohei
BONDFOG:bondfog
BONDURRI:StudioBondurri
BONES:Ibere Kuntz
lib/HashData/CPAN/AuthorName/ByPAUSEID.pm view on Meta::CPAN
MWBERRYMN:Marion Berryman
MWCZANECB:Zane C. Bowers
MWDHK:William Chan Wai-lam
MWELLS:Mark Wells
MWENDL:Michael C Wendl
MWESTBOM:Michael Westbom
MWEV:Max Vohlken
MWH:Matthew William Haycraft
MWILHELMY:Moritz Wilhelmy
MWILSON:Matt Wilson
MWITTE:Mario Witte
view all matches for this distribution
view release on metacpan or search on metacpan
share/keys.json view on Meta::CPAN
"kid": "f1vhQP9oOZkityrguynQqB4aVh8u9xcf3wm4AFF4aVw",
"use": "sig",
"alg": "ES256",
"x5c": [
"MIIByjCCAXGgAwIBAgIJAPZFN9WW4voaMAoGCCqGSM49BAMDMCIxIDAeBgNVBAMMF3ZjLnZycy5kaWdpdGFsLmdvLmpwIENBMB4XDTIxMTEyNTEyNTUxNloXDTIyMTEyNTEyNTUxNlowJjEkMCIGA1UEAwwbdmMudnJzLmRpZ2l0YWwuZ28uanAgSXNzdWVyMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEViKBgZ0f3pQKv+tSz6...
"MIIBkDCCATagAwIBAgIJAOECTZDa4MA7MAoGCCqGSM49BAMEMCcxJTAjBgNVBAMMHHZjLnZycy5kaWdpdGFsLmdvLmpwIFJvb3QgQ0EwHhcNMjExMTI1MTI1NTEzWhcNMjYxMTI0MTI1NTEzWjAiMSAwHgYDVQQDDBd2Yy52cnMuZGlnaXRhbC5nby5qcCBDQTBZMBMGByqGSM49AgEGCCqGSM49AwEHA0IABEL3S0yNIJ8EuxgiaH...
"MIIBlTCCATugAwIBAgIJANt2MZrWChe2MAoGCCqGSM49BAMEMCcxJTAjBgNVBAMMHHZjLnZycy5kaWdpdGFsLmdvLmpwIFJvb3QgQ0EwHhcNMjExMTI1MTI1NDUzWhcNMzExMTIzMTI1NDUzWjAnMSUwIwYDVQQDDBx2Yy52cnMuZGlnaXRhbC5nby5qcCBSb290IENBMFkwEwYHKoZIzj0CAQYIKoZIzj0DAQcDQgAEilfgw+JIG8...
],
"crv": "P-256",
"x": "ViKBgZ0f3pQKv-tSz653HUtIzCS8TVSNu1Hwi0tKpSk",
"y": "01177apKXH2HgGfkn71ZPEljWk0Q2fcEzY2_XOfL_Zc"
view all matches for this distribution
view release on metacpan or search on metacpan
mylib/include/ppport.h view on Meta::CPAN
BOL_t8_p8|5.033003||Viu
BOL_t8_pb|5.033003||Viu
BOL_tb|5.035004||Viu
BOL_tb_p8|5.033003||Viu
BOL_tb_pb|5.033003||Viu
BOM_UTF8|5.025005|5.003007|p
BOM_UTF8_FIRST_BYTE|5.019004||Viu
BOM_UTF8_TAIL|5.019004||Viu
boolSV|5.004000|5.003007|p
boot_core_builtin|5.035007||Viu
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
mylib/include/ppport.h view on Meta::CPAN
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
BmFLAGS|5.009005||Viu
BmPREVIOUS|5.003007||Viu
BmRARE|5.003007||Viu
BmUSEFUL|5.003007||Viu
BOL|5.003007||Viu
BOM_UTF8|5.025005|5.003007|p
BOM_UTF8_FIRST_BYTE|5.019004||Viu
BOM_UTF8_TAIL|5.019004||Viu
bool|5.003007||Viu
boolSV|5.004000|5.003007|p
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
bin/zipdetails view on Meta::CPAN
eval { $name = $opt_EncodingFrom->decode($name, Encode::FB_CROAK ) } ;
::warning $FH->tell() - length $name, "Could not decode '" . $opt_EncodingFrom->name() . "' $type: " . cleanEval $@
if $@;
}
# remove any BOM
$name =~ s/^\x{FEFF}//;
return $name ;
}
view all matches for this distribution
view release on metacpan or search on metacpan
BOL_t8_p8|5.033003||Viu
BOL_t8_pb|5.033003||Viu
BOL_tb|5.035004||Viu
BOL_tb_p8|5.033003||Viu
BOL_tb_pb|5.033003||Viu
BOM_UTF8|5.025005|5.003007|p
BOM_UTF8_FIRST_BYTE|5.019004||Viu
BOM_UTF8_TAIL|5.019004||Viu
boolSV|5.004000|5.003007|p
boot_core_builtin|5.035007||Viu
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
examples/detect-encoding.pl view on Meta::CPAN
for my $filename (@ARGV) {
my ($filehandle, $encoding, $bom) = html_file_and_encoding($filename);
close $filehandle;
$encoding .= " BOM=$bom" if defined $bom;
print "$filename: $encoding\n";
}
view all matches for this distribution
view release on metacpan or search on metacpan
t/000-report-versions.t view on Meta::CPAN
return $self->_error("Did not provide a string to load");
}
# Byte order marks
# NOTE: Keeping this here to educate maintainers
# my %BOM = (
# "\357\273\277" => 'UTF-8',
# "\376\377" => 'UTF-16BE',
# "\377\376" => 'UTF-16LE',
# "\377\376\0\0" => 'UTF-32LE'
# "\0\0\376\377" => 'UTF-32BE',
# );
if ( $string =~ /^(?:\376\377|\377\376|\377\376\0\0|\0\0\376\377)/ ) {
return $self->_error("Stream has a non UTF-8 BOM");
} else {
# Strip UTF-8 bom if found, we'll just ignore it
$string =~ s/^\357\273\277//;
}
view all matches for this distribution
view release on metacpan or search on metacpan
BOL_t8_p8|5.033003||Viu
BOL_t8_pb|5.033003||Viu
BOL_tb|5.035004||Viu
BOL_tb_p8|5.033003||Viu
BOL_tb_pb|5.033003||Viu
BOM_UTF8|5.025005|5.003007|p
BOM_UTF8_FIRST_BYTE|5.019004||Viu
BOM_UTF8_TAIL|5.019004||Viu
boolSV|5.004000|5.003007|p
boot_core_builtin|5.035007||Viu
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
view all matches for this distribution
view release on metacpan or search on metacpan
BOL_t8_p8|5.033003||Viu
BOL_t8_pb|5.033003||Viu
BOL_tb|5.035004||Viu
BOL_tb_p8|5.033003||Viu
BOL_tb_pb|5.033003||Viu
BOM_UTF8|5.025005|5.003007|p
BOM_UTF8_FIRST_BYTE|5.019004||Viu
BOM_UTF8_TAIL|5.019004||Viu
boolSV|5.004000|5.003007|p
boot_core_builtin|5.035007||Viu
boot_core_mro|5.009005||Viu
boot_core_PerlIO|5.007002||Viu
boot_core_UNIVERSAL|5.003007||Viu
#endif
#endif
#if 'A' == 65
#ifndef BOM_UTF8
# define BOM_UTF8 "\xEF\xBB\xBF"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xEF\xBF\xBD"
#endif
#elif '^' == 95
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x73\x66\x73"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x73\x73\x71"
#endif
#elif '^' == 176
#ifndef BOM_UTF8
# define BOM_UTF8 "\xDD\x72\x65\x72"
#endif
#ifndef REPLACEMENT_CHARACTER_UTF8
# define REPLACEMENT_CHARACTER_UTF8 "\xDD\x72\x72\x70"
#endif
view all matches for this distribution