view release on metacpan or search on metacpan
#include "ppport.h"
#include "const-c.inc"
#include <ucl.h>
bool implicit_unicode;
int ucl_string_flags;
static ucl_object_t *
_iterate_perl (pTHX_ SV* obj) {
if ( SvTYPE(obj) == SVt_NULL ) {
return newSViv((long long)ucl_object_toint (obj));
case UCL_FLOAT:
return newSVnv(ucl_object_todouble (obj));
case UCL_STRING: {
SV *sv = newSVpv(ucl_object_tostring (obj), 0);
if (implicit_unicode) {
SvUTF8_on(sv);
}
return sv;
}
case UCL_BOOLEAN: {
val = sv_2mortal((SV*)newHV());
while ((cur = ucl_object_iterate (obj, &it_obj, true))) {
SV *key = newSVpv(ucl_object_key(cur),0);
if (implicit_unicode)
SvUTF8_on(key);
hv_store_ent((HV*)val, sv_2mortal(key), _iterate_ucl(aTHX_ cur), 0);
}
val = newRV(val);
} else if (obj->type == UCL_ARRAY) {
INCLUDE: const-xs.inc
PROTOTYPES: ENABLED
SV *
_ucl_dump(SV *sv, bool _implicit_unicode, ucl_emitter_t emitter)
CODE:
implicit_unicode = _implicit_unicode;
ucl_object_t *root = NULL;
root = _iterate_perl(aTHX_ sv);
if (root) {
RETVAL = newSVpv((char *)ucl_object_emit(root, emitter), 0);
if (implicit_unicode)
SvUTF8_on(RETVAL);
ucl_object_unref(root);
}
OUTPUT:
RETVAL
DESTROY(struct ucl_parser *parser)
CODE:
ucl_parser_free(parser);
SV *
ucl_load(struct ucl_parser *parser, bool _implicit_unicode, int _ucl_string_flags)
CODE:
implicit_unicode = _implicit_unicode;
ucl_string_flags = _ucl_string_flags;
RETVAL = _load_ucl(aTHX_ parser);
OUTPUT:
RETVAL
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Config/Wrest.pm view on Meta::CPAN
will be detected and the serialization will throw a fatal error.
=head1 SEE ALSO
parse_file(), write_file() and the '@include' directive load L<File::Slurp::WithinPolicy> on demand to perform the file input/output operations.
See L<perlunicode> for more details on perl's Unicode handling, and L<Encode> for character recoding.
See L<Any::Template>, and the relevant templating modules, if the 'Subs' option is true.
Although this module can read and write data structures it is not intended as an all-purpose serialization system. For that
see L<Storable>.
Unicode Newline Guidelines from http://www.unicode.org/versions/Unicode4.0.0/ch05.pdf#G10213
=head1 VERSION
$Revision: 1.36 $ on $Date: 2006/08/22 14:09:50 $ by $Author: mattheww $
view all matches for this distribution
view release on metacpan or search on metacpan
raw bytes.
=item C<BER_TYPE_UTF8>
Like C<BER_TYPE_BYTES>, but decodes the value as if it were a UTF-8 string
(without validation!) and encodes a perl unicode string into a UTF-8 BER
string.
=item C<BER_TYPE_UCS2>
Similar to C<BER_TYPE_UTF8>, but treats the BER value as UCS-2 encoded
view all matches for this distribution
view release on metacpan or search on metacpan
parse_listexpr||5.013008|
parse_lparen_question_flags|||
parse_stmtseq||5.013006|
parse_subsignature|||
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free_nexttoke_ops|||
parser_free|||
path_is_searchable|||n
peep|||
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
tests/include/pdclib/auxiliary/uctype/test.h
tests/include/pdclib/auxiliary/uctype/text_utilities.c
tests/include/pdclib/auxiliary/uctype/text_utilities.h
tests/include/pdclib/auxiliary/uctype/uctype.c
tests/include/pdclib/auxiliary/uctype/uctype.h
tests/include/pdclib/auxiliary/uctype/unicode_data.c
tests/include/pdclib/auxiliary/uctype/unicode_data.h
tests/include/pdclib/CMakeLists.txt
tests/include/pdclib/COPYING.CC0
tests/include/pdclib/functions/_dlmalloc/malloc-2.8.6.patch
tests/include/pdclib/functions/_dlmalloc/malloc.c
tests/include/pdclib/functions/_PDCLIB/_PDCLIB_atomax.c
view all matches for this distribution
view release on metacpan or search on metacpan
examples/demo.pl view on Meta::CPAN
my $ascii = "HELLO";
print "[0/6] Testing Braille-ASCII : \"$ascii\"\n";
my $unicode = brailleAscii_To_Unicode ( $ascii );
print "[1/6] brailleAscii_To_Unicode : $ascii => $unicode (has length: ", length($unicode), ")\n";
my $dots = brailleAscii_To_DotNumbers ( $ascii );
print "[2/6] brailleAscii_To_DotNumbers : $ascii => $dots\n";
$ascii = brailleDotNumbers_To_Ascii ( $dots );
print "[3/6] brailleDotNumbers_To_Ascii : $dots => $ascii\n";
$unicode = brailleDotNumbers_To_Unicode ( $dots );
print "[4/6] brailleDotNumbers_To_Unicode: $dots => $unicode (has length: ", length($unicode), ")\n";
$Convert::Braille::dot_separator ="-";
$dots = brailleUnicode_To_DotNumbers ( $unicode );
print "[5/6] brailleUnicode_To_DotNumbers: $unicode => $dots\n";
$Convert::Braille::dot_separator = undef;
$ascii = brailleUnicode_To_Ascii ( $unicode );
print "[6/6] brailleUnicode_To_Ascii : $unicode => $ascii\n";
__END__
=head1 NAME
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/CharMap.pm view on Meta::CPAN
my $map = Convert::CharMap->load(CharMapML => 'test.xml');
$map->save(UCM => 'test.ucm');
=head1 DESCRIPTION
This module transforms between unicode character map formats, using
an in-memory representation of C<CharMapML> as the intermediate format.
Currently this module supports the C<CharMapML>, C<YAML> and C<UCM>
(write-only) backends.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/Ethiopic/System.pm view on Meta::CPAN
$WITHAM
$WITHSLASH
$WITHDAYCOMMA
$WITHUTF8
$unicode
$utf8
$sera
$image
$amh
lib/Convert/Ethiopic/System.pm view on Meta::CPAN
%ISOLanguages;
);
enumerate ( $TTName, $LESysNum, $LESysTV, $LEFontNum, $HasNum, $HTMLName );
enumerate ( $nocs, $acis, $acuwork, $addisword1, $addisword2, $alpas, $branai, $branaii, $cbhalea, $cbhaleb, $dehai, $dejene1, $dejene2, $ecoling, $ed, $enhpfr, $ethcitap, $ethcitas, $ethcitau, $ethiome, $ethiomex, $ethiop, $ethiopic1, $ethiopic2, $...
enumerate ( $notv, $clike, $decimal, $dos, $java, $uname, $uplus, $utf7, $utf8, $utf16, $zerox );
$noOps = 0;
lib/Convert/Ethiopic/System.pm view on Meta::CPAN
#
'EthioSoft' => [ 'EthioSoft', $ethiosoft, 0, 0, 1, 'ityo\\Soft\\' ],
#
# Unicode Based http://www.unicode.org/
#
'UTF7' => [ 'none', $unicode, $utf7, 0, 1, '\\UTF7\\' ],
'UTF8' => [ 'none', $unicode, $utf8, 0, 1, '\\UTF8\\' ],
'utf16' => [ 'none', $unicode, $utf16, 0, 1, '\\UTF16\\' ],
'unicode' => [ 'none', $unicode, $utf16, 0, 1, '\\UTF16\\' ],
'FirstTime' => [ 'none', $unicode, $utf8, 0, 1, '\\UTF8\\' ],
#
# Visual Ge'ez
#
'VG2-Main' => [ 'VG2 Main', $visualgez, 0, 0, 0, '\\Visual\\gI2z' ],
lib/Convert/Ethiopic/System.pm view on Meta::CPAN
'EXTRA~\`_FIDEL' => [ 'EXTRA~`_FIDEL', $fidelxtr2, 0, 1, 1, 'fidel' ],
#
# Extraneous Systems
#
'clike' => [ $noOps, $unicode, $clike, 0, 1, '\\ \\\\xABCD\\' ],
'Clike' => [ $uppercase, $unicode, $clike, 0, 1, '\\ \\\\xABCD\\' ],
'debug' => [ $debug, $sera, 0, 0, 1, '\\Debugging\\' ],
'decimal' => [ $noOps, $unicode, $decimal, 0, 1, '\\Debugging\\' ],
# 'image' => [ $noOps, $image, 0, 0, 1, '\\Image Fonts\\' ],
# 'Image' => [ $noOps, $image, 0, 0, 1, '\\Image Fonts\\' ],
'Image' => [ 'GF Zemen Primary', $gezfree1, 0, 0, 1, 'gI2z\\Free\\' ],
'java' => [ $noOps, $unicode, $java, 0, 1, '\\Java\\' ],
'Java' => [ $uppercase, $unicode, $java, 0, 1, '\\Java\\' ],
'UPlus' => [ $noOps, $unicode, $uplus, 0, 1, '\\U+abcd\\' ],
'UPlus' => [ $uppercase, $unicode, $uplus, 0, 1, '\\U+ABCD\\' ],
'zerox' => [ $noOps, $unicode, $zerox, 0, 1, '\\0xabcd\\' ],
'Zerox' => [ $uppercase, $unicode, $zerox, 0, 1, '\\0xABCD\\' ]
);
%TransferVariant = ( notv => $notv,
clike => $clike,
view all matches for this distribution
view release on metacpan or search on metacpan
inc/Pod/Markdown.pm view on Meta::CPAN
if ($section){
# TODO: sites/pod formatters differ on how to transform the section
# TODO: we could do it according to specified url prefix or pod formatter
# TODO: or allow a coderef?
# TODO: (Pod::Simple::XHTML:idify() for metacpan)
# TODO: (Pod::Simple::HTML section_escape/unicode_escape_url/section_url_escape for s.c.o.)
$url .= '#' . $section;
}
}
# if we don't know how to handle the url just print the pod back out
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/X509.pod view on Meta::CPAN
Result of method differs for scalar and list context:
- a hash-reference like {'C'=>['org'], 'OU'=>['cpan','search']};
values list often contains only one element, but many in general
- a list like ('CN=Name Surname','C=RU','L=Moscow')
X509 data may contains unicode strings,
so in general we have to decode it to localized one-byte oriented string.
It is the _second_ parameter (result codepage) subject method could accept.
But sometimes X509 data contains already "localized" one-byte string.
And its codepage (_first_ param accepted by subject)
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/XText.pm view on Meta::CPAN
=over 4
=item encode_xtext ($string_to_encode)
Expects a non-unicode-string to encode in xtext encoding. Returns
the encoded text.
=item decode_xtext ($string_to_decode)
Expects an xtext-encoded string and returns the decoded string.
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Convert/YText.pm view on Meta::CPAN
for use as the local part in an internet email address (RFC2822).
By default spaces are replaced with "+", "/" with "~", the characters
"A-Za-z0-9_.-" encode as themselves, and everything else is written
"=USTR=" where USTR is the base64 (using "A-Za-z0-9_." as digits)
encoding of the unicode character code. The encoding is configurable
(see below).
=head1 PROCEDURAL INTERFACE
The module can can export C<encode_ytext> which converts arbitrary
unicode string into a "safe" form, and C<decode_ytext> which recovers
the original text. C<validate_ytext> is a heuristic which returns 0
for bad input.
=cut
view all matches for this distribution
view release on metacpan or search on metacpan
parse_label||5.013007|
parse_listexpr||5.013008|
parse_lparen_question_flags|||
parse_stmtseq||5.013006|
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free_nexttoke_ops|||
parser_free|||
path_is_searchable|||n
peep|||
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cookie/Domain.pm view on Meta::CPAN
return( '' ) if( !length( $name ) );
# try-catch
local $@;
my $rv = eval
{
return( Net::IDN::Encode::domain_to_unicode( $name ) );
};
if( $@ )
{
return( $self->error( "An unexpected error occurred while encoding a domain name: $@" ) );
}
lib/Cookie/Domain.pm view on Meta::CPAN
return( $self->error( "Malformed domain name \"$name\"" ) ) if( $name !~ /$DOMAIN_RE/ );
my $labels = $self->new_array( [split( /\./, $name )] );
# if( $labels->length == 1 && !$opts->{min_suffix} )
# {
# my $single = $labels->[0];
# my $name_out = defined( $idn ) ? Net::IDN::Encode::domain_to_unicode( $single ) : $single;
# return( Cookie::Domain::Result->new({ name => $name_out, sub => undef, suffix => '' }) );
# }
my $any = {};
my $host = {};
lib/Cookie/Domain.pm view on Meta::CPAN
$suffix = $suffix->join( '.' );
$name = $labels->pop;
$sub = $labels->join( '.' ) if( $labels->length );
if( defined( $idn ) )
{
$suffix = Net::IDN::Encode::domain_to_unicode( $suffix );
$name = Net::IDN::Encode::domain_to_unicode( $name ) if( defined( $name ) );
$sub = Net::IDN::Encode::domain_to_unicode( $sub ) if( defined( $sub ) );
}
return(Cookie::Domain::Result->new({ name => $name, sub => $sub, suffix => $suffix }));
}
sub suffixes { return( shift->_set_get_hash_as_mix_object( 'suffixes', @_ ) ); }
lib/Cookie/Domain.pm view on Meta::CPAN
my $encoded = $d->encode( "xn--wmq0m700b.jp" );
say Encode::encode_utf8( $encoded );
If an error occurred, it sets an error object and returns L<perlfunc/undef>. The error can then be retrieved using L<Module::Generic/error> inherited by this module.
It uses L<Net::IDN::Encode/domain_to_unicode> to perform the actual encoding.
=head2 file
Sets the file path to the Public Suffix file. This file is a public domain file at the initiative of Mozilla Foundation and its latest version can be accessed here: L<https://publicsuffix.org/list/>
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Cookies/Roundtrip.pm view on Meta::CPAN
use DateTime;
use HTTP::Headers::Util qw/join_header_words/;
use Data::Compare;
use Devel::StackTrace; # until the module is stable
use Data::Roundtrip qw/perl2dump no-unicode-escape-permanently/;
use Exporter; # you need to import 'import' if you don't define it further down
# the EXPORT_OK and EXPORT_TAGS is code by [kcott] @ Perlmongs.org, thanks!
# see https://perlmonks.org/?node_id=11115288
our (@EXPORT_OK, %EXPORT_TAGS);
view all matches for this distribution
view release on metacpan or search on metacpan
xs/ppport.h view on Meta::CPAN
parse_fullstmt||5.013005|
parse_label||5.013007|
parse_listexpr||5.013008|
parse_stmtseq||5.013006|
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||
xs/ppport.h view on Meta::CPAN
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
t/Headers.t view on Meta::CPAN
\Q?UTF-8?B?\E
\S+
\s+
\Q<autarch\E\@\Qurth.org>\E
/x,
'email address is not encoded but unicode content before it is when address has no UTF-8'
);
}
{
my $header = Courriel::Header->new(
t/Headers.t view on Meta::CPAN
\Q?UTF-8?B?\E
\S+
\s+
\Q<Äutarch\E\@\Qurth.org>\E
/x,
'email address is not encoded but unicode content before it is even when address has UTF-8'
);
}
{
my $header = Courriel::Header->new(
view all matches for this distribution
view release on metacpan or search on metacpan
# OO-interface
$coder = Cpanel::JSON::XS->new->ascii->pretty->allow_nonref;
$pretty_printed_unencoded = $coder->encode ($perl_scalar);
$perl_scalar = $coder->decode ($unicode_json_text);
# Note that 5.6 misses most smart utf8 and encoding functionalities
# of newer releases.
# Note that L<JSON::MaybeXS> will automatically use Cpanel::JSON::XS
- added C<binary> extension, non-JSON and non JSON parsable, allows
C<\xNN> and C<\NNN> sequences.
- 5.6.2 support; sacrificing some utf8 features (assuming bytes
all-over), no multi-byte unicode characters with 5.6.
- interop for true/false overloading. JSON::XS, JSON::PP and Mojo::JSON
representations for booleans are accepted and JSON::XS accepts
Cpanel::JSON::XS booleans [#13, #37]
Fixed overloading of booleans. Cpanel::JSON::XS::true stringifies again
- #62 -Dusequadmath conversion and no SEGV.
- #72 parsing of values followed \0, like 1\0 does fail.
- #72 parsing of illegal unicode or non-unicode characters.
- #96 locale-insensitive numeric conversion.
- #154 numeric conversion fixed since 5.22, using the same strtold as perl5.
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);
=item 6. Raw non-Unicode characters below U+10FFFF are allowed.
The 66 Unicode noncharacters U+FDD0..U+FDEF, and U+*FFFE, U+*FFFF are
allowed without warning, as JSON::PP does, see
L<http://www.unicode.org/versions/corrigendum9.html>. But illegal
surrogate pairs fail to parse.
=item 7. Raw non-Unicode characters above U+10FFFF are disallowed.
Raw non-Unicode characters outside the valid unicode range fail to
parse, because "A string is a sequence of zero or more Unicode
characters" RFC 7159 section 1 and "JSON text SHALL be encoded in
Unicode RFC 7159 section 8.1. We use now the UTF8_DISALLOW_SUPER
flag when parsing unicode.
=item 8. Lone surrogates or illegal surrogate pairs are disallowed.
Since RFC 3629, U+D800 through U+DFFF are not legal Unicode values and
their UTF-8 encodings must be treated as an invalid byte sequence.
string to utf-8 automatically when seeing a codepoint >= C<0x80> and
< C<0x100>. With the binary flag enabled decode the perl utf8 encoded
string to the original byte encoding and encode this with C<\xNN>
escapes. This will result to the same encodings as with newer
perls. But note that binary multi-byte codepoints with 5.6 will
result in C<illegal unicode character in binary string> errors,
unlike with newer perls.
If C<$enable> is false, then the C<encode> method will smartly try to
detect Unicode characters unless required by the JSON syntax or other
flags and hex and octal sequences are forbidden.
See also the section I<ENCODING/CODESET FLAG NOTES> later in this
document.
The main use for this flag is to avoid the smart unicode detection and
possible double encoding. The disadvantage is that the resulting JSON
text is encoded in new C<\xNN> and in latin1 characters and must
correctly be treated as such when storing and transferring, a rare
encoding for JSON. It will produce non-readable JSON strings in the
browser. It is therefore most useful when you want to store data
databases, not when talking to other JSON encoders/decoders. The
binary decoding method can also be used when an encoder produced a
non-JSON conformant hex or octal encoding C<\xNN> or C<\NNN>.
Cpanel::JSON::XS->new->binary->encode (["\x{89}\x{abc}"])
5.6: Error: malformed or illegal unicode character in binary string
>=5.8: ['\x89\xe0\xaa\xbc']
Cpanel::JSON::XS->new->binary->encode (["\x{89}\x{bc}"])
=> ["\x89\xbc"]
Cpanel::JSON::XS->new->binary->decode (["\x89\ua001"])
Error: malformed or illegal unicode character in binary string
Cpanel::JSON::XS->new->decode (["\x89"])
Error: illegal hex character in non-binary string
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.
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
$json =~ s/"__proto__"\s*:/"__proto__renamed":/g;
This works because C<__proto__> is not valid outside of strings, so every
occurrence of C<"__proto__"\s*:> must be a string used as property name.
Raw non-Unicode characters outside the valid unicode range fail now to
parse, because "A string is a sequence of zero or more Unicode
characters" RFC 7159 section 1 and "JSON text SHALL be encoded in
Unicode RFC 7159 section 8.1. We use now the UTF8_DISALLOW_SUPER
flag when parsing unicode.
Since RFC 3629, U+D800 through U+DFFF are not legal Unicode values and
their UTF-8 encodings must be treated as an invalid byte sequence.
RFC 8259 section 8.2 admits the spec allows string values that contain
bit sequences that cannot encode Unicode characters and that the
view all matches for this distribution
view release on metacpan or search on metacpan
parse_fullstmt||5.013005|
parse_label||5.013007|
parse_listexpr||5.013008|
parse_stmtseq||5.013006|
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
src/x509/asn1.t0 view on Meta::CPAN
>> 0x3F and 0x80 or pad-append ;
\ Test whether a code point is invalid when encoding. This rejects the
\ 66 noncharacters, and also the surrogate range; this function does NOT
\ check that the value is in the 0..10FFFF range.
: valid-unicode? ( val -- bool )
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
src/x509/asn1.t0 view on Meta::CPAN
: 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
dup 0x80 < uf pad-append enduf
dup 0x800 < uf
6 >> 0xC0 or pad-append
val 0 pad-append-UTF8-chunk
view all matches for this distribution
view release on metacpan or search on metacpan
pad_sv|||
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
path_is_absolute|||
peep|||
pending_ident|||
perl_alloc_using|||n
perl_alloc|||n
view all matches for this distribution
view release on metacpan or search on metacpan
pad_sv|||
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
path_is_absolute|||
peep|||
pending_ident|||
perl_alloc_using|||n
perl_alloc|||n
view all matches for this distribution
view release on metacpan or search on metacpan
perl_glue/ppport.h view on Meta::CPAN
pad_sv||5.009005|
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
path_is_absolute|||n
peep|||
pending_ident|||
perl_alloc_using|||n
perl_alloc|||n
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/ppport.h view on Meta::CPAN
parser_free|5.009005||Viu
parser_free_nexttoke_ops|5.017006||Viu
parse_stmtseq|5.013006|5.013006|x
parse_subsignature|5.031003|5.031003|x
parse_termexpr|5.013008|5.013008|x
parse_unicode_opts|5.008001||Viu
parse_uniprop_string|5.027011||Viu
PATCHLEVEL|5.003007||Viu
path_is_searchable|5.019001||Vniu
Pause|5.003007||Viu
pause|5.005000||Viu
lib/Crypt/ppport.h view on Meta::CPAN
PL_tokenbuf||5.003007|ponu
PL_top_env|5.005000||Viu
PL_toptarget|5.005000||Viu
PL_TR_SPECIAL_HANDLING_UTF8|5.031006||Viu
PL_underlying_numeric_obj|5.027009||Viu
PL_unicode|5.008001||Viu
PL_unitcheckav|5.009005||Viu
PL_unitcheckav_save|5.009005||Viu
PL_unlockhook|5.007003||Viu
PL_unsafe|5.005000||Viu
PL_UpperLatin1|5.019005||Viu
lib/Crypt/ppport.h view on Meta::CPAN
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/HSXKPasswd.pm view on Meta::CPAN
use Crypt::HSXKPasswd::RNG::Data_Entropy;
use Crypt::HSXKPasswd::RNG::DevUrandom;
use Crypt::HSXKPasswd::RNG::Basic;
# set things up for using UTF-8
use 5.016; # min Perl for good UTF-8 support, implies feature 'unicode_strings'
use Encode qw( encode decode );
use Text::Unidecode; # for stripping accents from accented characters
use utf8;
binmode STDOUT, ':encoding(UTF-8)';
lib/Crypt/HSXKPasswd.pm view on Meta::CPAN
return $ans;
}
#####-SUB-######################################################################
# Type : CLASS (PRIVATE)
# Purpose : Get the so-called 'grapheme length' of a unicode string, that is
# to say, the length of a word where a letter with an accent counts
# as a single letter.
# Returns : An integer
# Arguments : 1) the string to get the length of
# Throws : Croaks on invalid invocation and invalid args
view all matches for this distribution
view release on metacpan or search on metacpan
pad_sv|||
pad_swipe|||
pad_tidy|||
pad_undef|||
parse_body|||
parse_unicode_opts|||
path_is_absolute|||
peep|||
pending_ident|||
perl_alloc_using|||n
perl_alloc|||n
view all matches for this distribution
view release on metacpan or search on metacpan
lib/Crypt/Komihash.xs view on Meta::CPAN
UV komihash(SV *input, UV seednum = 0)
CODE:
STRLEN len = 0;
// Take the bytes in input, put the length in len, and get a pointer to the bytes
// We use SvPVbyte instead of SvPV to handle unicode correctly
char *buf = SvPVbyte(input, len);
RETVAL = (UV)komihash(buf, len, seednum);
OUTPUT:
RETVAL
view all matches for this distribution
view release on metacpan or search on metacpan
parse_fullstmt||5.013005|
parse_label||5.013007|
parse_listexpr||5.013008|
parse_stmtseq||5.013006|
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free|||
path_is_absolute|||n
peep|||
pending_Slabs_to_ro|||
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
parse_listexpr||5.013008|
parse_lparen_question_flags|||
parse_stmtseq||5.013006|
parse_subsignature|||
parse_termexpr||5.013008|
parse_unicode_opts|||
parser_dup|||
parser_free_nexttoke_ops|||
parser_free|||
path_is_searchable|||n
peep|||
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution
view release on metacpan or search on metacpan
parser_free|5.009005||Viu
parser_free_nexttoke_ops|5.017006||Viu
parse_stmtseq|5.013006|5.013006|x
parse_subsignature|5.031003|5.031003|x
parse_termexpr|5.013008|5.013008|x
parse_unicode_opts|5.008001||Viu
parse_uniprop_string|5.027011||Viu
PATCHLEVEL|5.003007||Viu
path_is_searchable|5.019001||Vniu
Pause|5.003007||Viu
pause|5.005000||Viu
PL_tokenbuf||5.003007|ponu
PL_top_env|5.005000||Viu
PL_toptarget|5.005000||Viu
PL_TR_SPECIAL_HANDLING_UTF8|5.031007||Viu
PL_underlying_numeric_obj|5.027009||Viu
PL_unicode|5.008001||Viu
PL_unitcheckav|5.009005||Viu
PL_unitcheckav_save|5.009005||Viu
PL_unlockhook|5.007003||Viu
PL_unsafe|5.005000||Viu
PL_UpperLatin1|5.019005||Viu
#ifndef PERL_PV_PRETTY_REGPROP
# define PERL_PV_PRETTY_REGPROP PERL_PV_PRETTY_ELLIPSES|PERL_PV_PRETTY_LTGT|PERL_PV_ESCAPE_RE
#endif
/* Hint: pv_escape
* Note that unicode functionality is only backported to
* those perl versions that support it. For older perl
* versions, the implementation will fall back to bytes.
*/
#ifndef pv_escape
view all matches for this distribution