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/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
lib/Clustericious/RouteBuilder/Search.pm view on Meta::CPAN
#TRACE "searching for $items : ".Dumper($p);
# maybe restrict, by first calling $manager->normalize_get_objects_args(%$p)
my $all = delete $p->{query_all};
# "If the first argument is a hash it is treated as 'query'" -- RDBOM docs
my @args = $all || exists( $p->{query} ) ? %$p
: ( keys %$p > 0 ) ? $p
: ();
TRACE "args are @args";
push @args, object_class => $manager->object_class;
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Code/TidyAll/Plugin/YAMLFrontMatter.pm view on Meta::CPAN
}
catch {
die "File does not match encoding '$encoding': $_";
};
# is there a BOM? There's not meant to be a BOM!
if ( $src =~ /\A\x{EF}\x{BB}\x{BF}/ ) {
die "Starting document with UTF-8 BOM is not allowed\n";
}
# match the YAML front matter.
my $yaml;
unless ( ($yaml) = $src =~ $YAML_REGEX ) {
lib/Code/TidyAll/Plugin/YAMLFrontMatter.pm view on Meta::CPAN
=item There's no YAML Front Matter
=item The YAML Front Matter isn't valid YAML
=item There's a UTF-8 BOM at the start of the file
=item The file isn't encoded in the configured encoding (UTF-8 by default)
=item The YAML Front Matter is missing one or more configured top level keys
view all matches for this distribution
view release on metacpan or search on metacpan
php/PHP_CodeSniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php view on Meta::CPAN
<?php
/**
* A simple sniff for detecting BOMs that may corrupt application work.
*
* @author Piotr Karas <office@mediaself.pl>
* @author Greg Sherwood <gsherwood@squiz.net>
* @copyright 2010-2014 mediaSELF Sp. z o.o.
* @license https://github.com/squizlabs/PHP_CodeSniffer/blob/master/licence.txt BSD Licence
php/PHP_CodeSniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php view on Meta::CPAN
class ByteOrderMarkSniff implements Sniff
{
/**
* List of supported BOM definitions.
*
* Use encoding names as keys and hex BOM representations as values.
*
* @var array
*/
protected $bomDefinitions = [
'UTF-8' => 'efbbbf',
php/PHP_CodeSniffer/src/Standards/Generic/Sniffs/Files/ByteOrderMarkSniff.php view on Meta::CPAN
*
* @return void
*/
public function process(File $phpcsFile, $stackPtr)
{
// The BOM will be the very first token in the file.
if ($stackPtr !== 0) {
return;
}
$tokens = $phpcsFile->getTokens();
view all matches for this distribution
view release on metacpan or search on metacpan
share/js/jquery-1.11.3.js view on Meta::CPAN
// Need init if jQuery is called (just allow error to be thrown if not included)
return new jQuery.fn.init( selector, context );
},
// Support: Android<4.1, IE<9
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
// Matches dashed string for camelizing
rmsPrefix = /^-ms-/,
rdashAlpha = /-([\da-z])/gi,
view all matches for this distribution
view release on metacpan or search on metacpan
t/test-cogids view on Meta::CPAN
DPSSDL3FMUVBQYZZD4LYD354DQ
FFPV5VPLBO2UI6JQ33LJ7B5GMU
HPPOYEAGS4Y43S35TH6UMMGHGA
ZBDPRYG6IB6DCC2XNKTH2WGJOY
PL7OVH4ZH7D7EJKNUX4C2BOMZE
XVNKP53CY3PS4ADCBH5CROVIKE
X6M5EX7Y6UABGHPYFFWVDVMYDE
22HBYOVHMZ4XOHGRPG53AYY7NA
NXQZUQGHMEZUAHKQHT5HUKNYEE
ONTAEGGD3L3RCFYYPUUIF3WWZ4
t/test-cogids view on Meta::CPAN
VHLI7S5LBQS52PQYHJAERJWIEI
L7NE3RRXJ37XTJZSL3TLA3GR6U
JUQ2DKOSQHXNSDECYGUZ65SDS4
W3DU7NVP5SNJO2GFQXKLMZ3LK4
75MAPZVETRBWYB63W4ZHS2XNDI
Z2TBGSWVWVF4YS36M2ZDDV5BOM
JWOAVRIDKYTTKR5XMXFLHCGBUI
X4LKAK6YVMS47WV5KLEOPEUQ64
7EH25LZYYEGUEL3EUODI7OQV2E
2YTU4CGMDU6PLNFMDRLGGMQ3GM
NIAO45RP4OT3HDEP7F62M4OFNA
view all matches for this distribution
view release on metacpan or search on metacpan
7zip/CPP/7zip/UI/FileManager/TextPairs.cpp view on Meta::CPAN
#include "TextPairs.h"
static const wchar_t kNewLineChar = '\n';
static const wchar_t kQuoteChar = '\"';
static const wchar_t kBOM = (wchar_t)0xFEFF;
static bool IsSeparatorChar(wchar_t c)
{
return (c == ' ' || c == '\t');
}
7zip/CPP/7zip/UI/FileManager/TextPairs.cpp view on Meta::CPAN
pairs.Clear();
int pos = 0;
if (srcString.Length() > 0)
{
if (srcString[0] == kBOM)
pos++;
}
while (pos < srcString.Length())
{
int finishPos;
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
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
? 0 \
: UTF8SKIP(s))
#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
#else
view all matches for this distribution
view release on metacpan or search on metacpan
ext/zstd/tests/golden-compression/PR-3517-block-splitter-corruption-test view on Meta::CPAN
0000000100114101031400000000100114101031400000000100114101031400000000000010011410103010020121000400200110101112112102133020000130103110012004100203000040200001001120000100200220000001202001111101010121201010115010002004010100021001100001002200200200...
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||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
GdFPBRAAv90tFV0aqJiz1Dfb7Y4Q12uy4sQke9tG9UUk/7BWEDzAbUsE9fbNV4sE
KoNtxsmro7luJjSomQYtRQRlygtdvvCd9iJvFNfQejGB5FdoscAinxa5uVPNSAPM
2vywmxN0wdPvHk79d2BtlLoDI1d4TcVuWkHSry7FqY9LhMLjN02YZNEFB6S9ocy5
K79NUHJaATMcUH0kfskFcSHmy56lxsbGwHJ3Kgy2ONkCEv++X6KjV85bkml5LXc/
zEugc1L8DCgzhUmc+eJrAtOvt5IvCJPc/PD6VpCVuW9Ke0FgOL5aD7DUtt8zc5jW
U6XybXi7lz0hFYOHwK8eAFxFykjchH3iUEWvFPv1t+y2zv6BvDWYlBOMj/Bcb4II
nPGa17Ohi8HK8Sqg/8mJbybaU+AzKPO5+zd46QUZ9nvvsTeyrX6DheDkJ9xJiEc8
9UnXFooKyp8mXRDrfCYVFSpCT4pszFza8gG39h1VUhkTL2KcqT01b/yHrpDRTM5p
C1z8MpLXtzRcgc3cl98u9Rl1mWiuP7KlDfQ24BiIZy6nlAE0TGw0G3zCuqeFO/QY
pMVc6zU0mzBJ8sfuQ7qMAmwMIWFrCVgBur6gkvsV/K+ql7JNeGS6jPCecgUEA/1S
0HQbZufYbz7fmBAT028IhLUm8tbrVDV8Lhmp7PZ0BN/JV39rd4E=
view all matches for this distribution
view release on metacpan or search on metacpan
$Config::General::VERSION = "2.67";
use base qw(Exporter);
our @EXPORT_OK = qw(ParseConfig SaveConfig SaveConfigString);
use constant _UTF8_BOM => "\x{ef}\x{bb}\x{bf}";
sub new {
#
# create new Config::General object
#
my ($this, $file) = @_;
my $fh = IO::File->new( $file, 'r')
or croak "Config::General: Could not open $file!($!)\n";
# attempt to read an initial utf8 byte-order mark (BOM)
my $n_read = sysread $fh, my $read_BOM, length(_UTF8_BOM);
my $has_BOM = $n_read == length(_UTF8_BOM) && $read_BOM eq _UTF8_BOM;
# set utf8 perlio layer if BOM was found or if option -UTF8 is turned on
binmode $fh, ":utf8" if $this->{UTF8} || $has_BOM;
# rewind to beginning of file if we read chars that were not the BOM
sysseek $fh, 0, 0 if $n_read && !$has_BOM;
return $fh;
}
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/INI/Reader.pm view on Meta::CPAN
my $self = ref $invocant ? $invocant : $invocant->new;
# parse the file
LINE: while (my $line = $handle->getline) {
if ($handle->input_line_number == 1 && $line =~ /\A\x{FEFF}/) {
Carp::confess("input handle appears to start with a BOM");
}
$self->preprocess_line(\$line);
next LINE if $self->can_ignore($line, $handle);
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/IniFiles.pm view on Meta::CPAN
seek $fh, -1, SEEK_CUR();
}
}
}
# If there's a UTF BOM (Byte-Order-Mark) in the first
# character of the first line then remove it before processing
# ( http://www.unicode.org/unicode/faq/utf_bom.html#22 )
$s =~ s/\A//;
return $s;
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
1.69 Dec 1, 2008
- Delete temporal files created on tests (bug report by
Andreas Koenig)
1.68 Oct 27, 2007
- the regular expresion used to detect unicode BOM was not correct
- work around unicode bug in perl 5.6.0
- require perl 5.6.0 in Makefile.PL
- test pods
1.67 Aug 20, 2007
- the regular expression used to remove utf8 byte order marks
was failing on 5.6.x due to a perl bug (reported by Dominik
Stadler).
0.60 Jun 27 2005
- handle utf8 BOM (bug reported by Trent Wood).
- doc typos corrected
0.59 Apr 14 2005
- remove old unused deprecated features PERL_MODE and object
creation from prototype.
view all matches for this distribution
view release on metacpan or search on metacpan
Changelog.ini view on Meta::CPAN
EOT
[V 2.23]
Date=2015-10-14T09:11:00
Comments= <<EOT
- Add the utf8 BOM to this file. Let's hope the CPAN toolchain can cope. If it can't, another
version of the code will have to be released.
- Fix read() and write() so they work on files called '0' (zero). See RT#107754.
Many thanx to Gregory Kidrenko for the report and patch.
- Add t/05.zero.t and t/0 to test the new code.
- Reformat the source slightly.
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
lib/Convos/public/js/jquery.js view on Meta::CPAN
// Need init if jQuery is called (just allow error to be thrown if not included)
return new jQuery.fn.init( selector, context );
},
// Support: Android<4.1, IE<9
// Make sure we trim BOM and NBSP
rtrim = /^[\s\uFEFF\xA0]+|[\s\uFEFF\xA0]+$/g,
// Matches dashed string for camelizing
rmsPrefix = /^-ms-/,
rdashAlpha = /-([\da-z])/gi,
view all matches for this distribution
view release on metacpan or search on metacpan
t/data/stress-test/mbox_mime_video_verizon_1.txt view on Meta::CPAN
C3W7W+1hIFV7Ft6OmkZy8TaF+tre2axtkai8IDCstFl6kBxkR5MFb0mtDThGplYTPvR1Zejj
TOFZxfjaDEX+fdi4RrYgCsZ6IPQ9MUHFJjQdgou8gcANGif2azQ6xgYL5mCpbdEfqtm4rg86
nbQO1BxqMaxerJ+uGfrS+zZBkCew1jWr5jCZgUB73o4CwZiPTlDVIMyBOg6FTA0IhjxcliZG
56QmFtewER3CrJDghfmaHoK8iIp5ZAFKd4UWL6DkzhyQDRlM8KHjfiYEpdtq8SLdZGJgkGfS
tPjRaQYBhrLKsW8QIzAaQB7dTArQ8PHzO2skjH2IvzrNhBrUUsLoisUrTI0iENMLozAXqe02
txaIo3U2jBOMoykbCa1KcEeWk2mgRyNs2fX9PsJyPF5+iykYHYjEDkchZxckbzKeybC96UB4
3xanMhJ6zINRaSRTgJeArDw/erhcMl9G9oiwFyz2Rch5xsZrJ4QiCbtJD72tbCcK/JJgRwlY
IRZE2bxyF0Zkwp3hG9GjHDI0QqHTSmaC9prwYzb1vhPNZHdI8YhTwaiEjItxZkLz7gKZt84M
q2CXnafvE4bE15zlc2OFMef55pG4mc/o1dpuYxDAbtFiyMFkaGaQT2XH2wWAfGEAAAG2W8BJ
LhmuZQpxOM/+isy+jTSMY1phNUz38JRleLadoMceMSXjR7xldn0ZGaMBmiOowJSIhUbdIzIi
KhEGCFz0j8gyeMG0Z4U9bowvTi4seEzxngqxrYFtRDO8zqJQZrhnnz/0o6AspGuxYxtGIUeZ
view all matches for this distribution
view release on metacpan or search on metacpan
encode_stringify, allow_bignum, allow_singlequote, dupkeys_as_arrayref,
sort_by (partially), escape_slash, convert_blessed, ...
optional decode_json(, allow_nonref) arg.
relaxed implements allow_dupkeys.
- support all 5 unicode L<BOM|/BOM>'s: UTF-8, UTF-16LE, UTF-16BE, UTF-32LE,
UTF-32BE, encoding internally to UTF-8.
=cut
our @ISA = qw(Exporter);
This is a complex example, but most of the complexity comes from the fact
that we are trying to be correct (bear with me if I am wrong, I never ran
the above example :).
=head1 BOM
Detect all unicode B<Byte Order Marks> on decode.
Which are UTF-8, UTF-16LE, UTF-16BE, UTF-32LE and UTF-32BE.
The BOM encoding is set only for one specific decode call, it does not
change the state of the JSON object.
B<Warning>: With perls older than 5.20 you need load the Encode module
before loading a multibyte BOM, i.e. >= UTF-16. Otherwise an error is
thrown. This is an implementation limitation and might get fixed later.
See L<https://tools.ietf.org/html/rfc7159#section-8.1>
I<"JSON text SHALL be encoded in UTF-8, UTF-16, or UTF-32.">
I<"Implementations MUST NOT add a byte order mark to the beginning of a
JSON text", "implementations (...) MAY ignore the presence of a byte
order mark rather than treating it as an error".>
See also L<http://www.unicode.org/faq/utf_bom.html#BOM>.
Beware that Cpanel::JSON::XS is currently the only JSON module which
does accept and decode a BOM.
The latest JSON spec
L<https://www.greenbytes.de/tech/webdav/rfc8259.html#character.encoding>
forbid the usage of UTF-16 or UTF-32, the character encoding is UTF-8.
Thus in subsequent updates BOM's of UTF-16 or UTF-32 will throw an error.
=head1 MAPPING
This section describes how Cpanel::JSON::XS maps Perl values to JSON
values and vice versa. These mappings are designed to "do the right
view all matches for this distribution
view release on metacpan or search on metacpan
src/x509/asn1.t0 view on Meta::CPAN
dup 0xFDD0 0xFDEF between? if drop 0 ret then
dup 0xD800 0xDFFF between? if drop 0 ret then
0xFFFF and 0xFFFE < ;
\ Encode a code point in UTF-8. Offset is in the pad; it is updated, or
\ set to 0 on error. Leading BOM are ignored.
: encode-UTF8 ( val off -- off )
\ Skip leading BOM (U+FEFF when off is 1).
dup2 1 = swap 0xFEFF = and if swap drop ret then
swap dup { val }
dup valid-unicode? ifnot 2drop 0 ret then
choice
src/x509/asn1.t0 view on Meta::CPAN
off encode-UTF8 >off
repeat
drop off dup ifnot ret then 1- addr-pad set8 -1 ;
\ Decode a UTF-16 string into the pad. The string is converted to UTF-8,
\ and the length is written in the first pad byte. A leading BOM is
\ honoured (big-endian is assumed if there is no BOM). A code point of
\ value 0 is an error. Returned value is true (-1) on success, false (0)
\ on error.
: read-value-UTF16 ( lim -- lim bool )
read-length-open-elt
dup ifnot addr-pad set8 -1 ret then
1 { off }
read-UTF16BE dup 0xFFFE = if
\ Leading BOM, and indicates little-endian.
drop
begin dup while
read-UTF16LE dup ifnot drop skip-close-elt 0 ret then
off encode-UTF8 >off
repeat
else
dup ifnot drop skip-close-elt 0 ret then
\ Big-endian BOM, or no BOM.
begin
off encode-UTF8 >off
dup while
read-UTF16BE dup ifnot drop skip-close-elt 0 ret then
repeat
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/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
lib/Crypt/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/Crypt-LibSCEP.t view on Meta::CPAN
BAYTAkRFMQ0wCwYDVQQIDARhc2RmMQ0wCwYDVQQHDARhc2RmMQ0wCwYDVQQKDARh
c2RmMQswCQYDVQQDDAJjYTAeFw0xNTAzMTUxMjIxNThaFw0xODAxMDIxMjIxNTha
MEcxCzAJBgNVBAYTAkRFMQ0wCwYDVQQIDARhc2RmMQ0wCwYDVQQHDARhc2RmMQ0w
CwYDVQQKDARhc2RmMQswCQYDVQQDDAJjYTBcMA0GCSqGSIb3DQEBAQUAA0sAMEgC
QQC2ZbZXN6Q+k4yECXUBrv3x/zF0F16G9Yx+b9qxdhkP/+BkA5gyRFNEWL+EovU2
00F/mSpYsFW+VlIGW0x0rBvJAgMBAAGjUDBOMB0GA1UdDgQWBBTGyK1AVoV5v/Ou
4FmWrxNg3Aqv5zAfBgNVHSMEGDAWgBTGyK1AVoV5v/Ou4FmWrxNg3Aqv5zAMBgNV
HRMEBTADAQH/MA0GCSqGSIb3DQEBBQUAA0EAFZJdlgEgGTOzRdtPsRY0ezWVow26
1OUUf1Z6x0e9z/Nzkoo2kfI4iDafebvQ1yMqSWKbUjLGAi/YCq2m3p5tHA==
-----END CERTIFICATE-----
";
view all matches for this distribution