summaryrefslogtreecommitdiffstats
path: root/gnu/usr.bin/perl/cpan/Unicode-Normalize
diff options
context:
space:
mode:
authorafresh1 <afresh1@openbsd.org>2017-02-05 00:31:51 +0000
committerafresh1 <afresh1@openbsd.org>2017-02-05 00:31:51 +0000
commitb8851fcc53cbe24fd20b090f26dd149e353f6174 (patch)
tree4b7c1695865f00ab7a0da30b5632d514848ea3a2 /gnu/usr.bin/perl/cpan/Unicode-Normalize
parentAdd option PCIVERBOSE. (diff)
downloadwireguard-openbsd-b8851fcc53cbe24fd20b090f26dd149e353f6174.tar.xz
wireguard-openbsd-b8851fcc53cbe24fd20b090f26dd149e353f6174.zip
Fix merge issues, remove excess files - match perl-5.24.1 dist
Diffstat (limited to 'gnu/usr.bin/perl/cpan/Unicode-Normalize')
-rw-r--r--gnu/usr.bin/perl/cpan/Unicode-Normalize/Makefile.PL27
-rw-r--r--gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.pm27
-rw-r--r--gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.xs75
-rw-r--r--gnu/usr.bin/perl/cpan/Unicode-Normalize/mkheader23
-rwxr-xr-xgnu/usr.bin/perl/cpan/Unicode-Normalize/t/func.t77
-rwxr-xr-xgnu/usr.bin/perl/cpan/Unicode-Normalize/t/illegal.t2
6 files changed, 151 insertions, 80 deletions
diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/Makefile.PL b/gnu/usr.bin/perl/cpan/Unicode-Normalize/Makefile.PL
index c2bd32c937a..44a4b8ded85 100644
--- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/Makefile.PL
+++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/Makefile.PL
@@ -3,6 +3,8 @@ use ExtUtils::MakeMaker;
my $clean = {};
+my $mm_ver = ExtUtils::MakeMaker->VERSION;
+
if (-f "Normalize.xs") {
print STDERR "Making header files for XS...\n";
@@ -12,7 +14,12 @@ if (-f "Normalize.xs") {
}
WriteMakefile(
- 'AUTHOR' => 'SADAHIRO Tomoyuki <SADAHIRO@cpan.org>',
+ ($mm_ver < 6.58)
+ ? ('AUTHOR' => 'SADAHIRO Tomoyuki <SADAHIRO@cpan.org>, Karl Williamson <khw@cpan.org>')
+ : ('AUTHOR' => [
+ 'SADAHIRO Tomoyuki <SADAHIRO@cpan.org>',
+ 'Karl Williamson <khw@cpan.org>',
+ ]),
'ABSTRACT' => 'Unicode Normalization Forms',
'INSTALLDIRS' => ($] >= 5.007002 && $] < 5.011) ? 'perl' : 'site',
# see perl5110delta, @INC reorganization
@@ -20,15 +27,29 @@ WriteMakefile(
'NAME' => 'Unicode::Normalize',
'VERSION_FROM' => 'Normalize.pm', # finds $VERSION
'clean' => $clean,
+ 'depend' => { 'Normalize.o' => '$(H_FILES)' },
'PREREQ_PM' => {
- bytes => 0,
Carp => 0,
constant => 0,
DynaLoader => 0,
Exporter => 0,
- File::Copy => 0,
File::Spec => 0,
strict => 0,
warnings => 0,
+ SelectSaver => 0,
},
+ ($mm_ver < 6.48 ? () : MIN_PERL_VERSION => 5.6.0),
+ ($mm_ver < 6.46 ? () : (META_MERGE => {
+ 'meta-spec' => { version => 2 },
+ resources => {
+ repository => {
+ url => 'https://github.com/khwilliamson/Unicode-Normalize.git',
+ web => 'https://github.com/khwilliamson/Unicode-Normalize',
+ type => 'git',
+ },
+ bugtracker => {
+ web => 'https://rt.cpan.org/Public/Dist/Display.html?Name=Unicode-Normalize',
+ },
+ },
+ })),
);
diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.pm b/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.pm
index 2331e8b7069..ff6c0f0dc47 100644
--- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.pm
+++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.pm
@@ -16,7 +16,7 @@ use Carp;
no warnings 'utf8';
-our $VERSION = '1.17';
+our $VERSION = '1.25';
our $PACKAGE = __PACKAGE__;
our @EXPORT = qw( NFC NFD NFKC NFKD );
@@ -45,6 +45,10 @@ sub pack_U {
}
sub unpack_U {
+
+ # The empty pack returns an empty UTF-8 string, so the effect is to force
+ # the shifted parameter into being UTF-8. This allows this to work on
+ # Perl 5.6, where there is no utf8::upgrade().
return unpack('U*', shift(@_).pack('U*'));
}
@@ -539,22 +543,29 @@ C<normalize> and other some functions: on request.
Since this module refers to perl core's Unicode database in the directory
F</lib/unicore> (or formerly F</lib/unicode>), the Unicode version of
-normalization implemented by this module depends on your perl's version.
+normalization implemented by this module depends on what has been
+compiled into your perl. The following table lists the default Unicode
+version that comes with various perl versions. (It is possible to change
+the Unicode version in any perl version to be any earlier Unicode version,
+so one could cause Unicode 3.2 to be used in any perl version starting with
+5.8.0. See C<$Config{privlib}>/F<unicore/README.perl>.
perl's version implemented Unicode version
5.6.1 3.0.1
5.7.2 3.1.0
5.7.3 3.1.1 (normalization is same as 3.1.0)
5.8.0 3.2.0
- 5.8.1-5.8.3 4.0.0
- 5.8.4-5.8.6 4.0.1 (normalization is same as 4.0.0)
- 5.8.7-5.8.8 4.1.0
+ 5.8.1-5.8.3 4.0.0
+ 5.8.4-5.8.6 4.0.1 (normalization is same as 4.0.0)
+ 5.8.7-5.8.8 4.1.0
5.10.0 5.0.0
- 5.8.9, 5.10.1 5.1.0
+ 5.8.9, 5.10.1 5.1.0
5.12.x 5.2.0
5.14.x 6.0.0
5.16.x 6.1.0
5.18.x 6.2.0
+ 5.20.x 6.3.0
+ 5.22.x 7.0.0
=item Correction of decomposition mapping
@@ -582,8 +593,12 @@ lower than 4.1.0.
SADAHIRO Tomoyuki <SADAHIRO@cpan.org>
+Currently maintained by <perl5-porters@perl.org>
+
Copyright(C) 2001-2012, SADAHIRO Tomoyuki. Japan. All rights reserved.
+=head1 LICENSE
+
This module is free software; you can redistribute it
and/or modify it under the same terms as Perl itself.
diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.xs b/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.xs
index a189a5d38b8..4acff7fe490 100644
--- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.xs
+++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/Normalize.xs
@@ -20,15 +20,24 @@
#include "unfcmp.h"
#include "unfexc.h"
-/* Perl 5.6.1 ? */
-#ifndef uvuni_to_utf8
-#define uvuni_to_utf8 uv_to_utf8
-#endif /* uvuni_to_utf8 */
-
-/* Perl 5.6.1 ? */
-#ifndef utf8n_to_uvuni
-#define utf8n_to_uvuni utf8_to_uv
-#endif /* utf8n_to_uvuni */
+/* The generated normalization tables since v5.20 are in native character set
+ * terms. Prior to that, they were in Unicode terms. So we use 'uvchr' for
+ * later perls, and redefine that to be 'uvuni' for earlier ones */
+#if PERL_VERSION < 20
+# undef uvchr_to_utf8
+# ifdef uvuni_to_utf8
+# define uvchr_to_utf8 uvuni_to_utf8
+# else /* Perl 5.6.1 */
+# define uvchr_to_utf8 uv_to_utf8
+# endif
+
+# undef utf8n_to_uvchr
+# ifdef utf8n_to_uvuni
+# define utf8n_to_uvchr utf8n_to_uvuni
+# else /* Perl 5.6.1 */
+# define utf8n_to_uvchr utf8_to_uv
+# endif
+#endif
/* UTF8_ALLOW_BOM is used before Perl 5.8.0 */
#ifndef UTF8_ALLOW_BOM
@@ -47,9 +56,13 @@
#define UTF8_ALLOW_FFFF (0)
#endif /* UTF8_ALLOW_FFFF */
+#ifndef PERL_UNUSED_VAR
+# define PERL_UNUSED_VAR(x) ((void)sizeof(x))
+#endif
+
#define AllowAnyUTF (UTF8_ALLOW_SURROGATE|UTF8_ALLOW_BOM|UTF8_ALLOW_FE_FF|UTF8_ALLOW_FFFF)
-/* check if the string buffer is enough before uvuni_to_utf8(). */
+/* check if the string buffer is enough before uvchr_to_utf8(). */
/* dstart, d, and dlen should be defined outside before. */
#define Renew_d_if_not_enough_to(need) STRLEN curlen = d - dstart; \
if (dlen < curlen + (need)) { \
@@ -58,7 +71,7 @@
d = dstart + curlen; \
}
-/* if utf8n_to_uvuni() sets retlen to 0 (if broken?) */
+/* if utf8n_to_uvchr() sets retlen to 0 (if broken?) */
#define ErrRetlenIsZero "panic (Unicode::Normalize %s): zero-length character"
/* utf8_hop() hops back before start. Maybe broken UTF-8 */
@@ -197,10 +210,10 @@ static U8* pv_cat_decompHangul(pTHX_ U8* d, UV uv)
if (! Hangul_IsS(uv))
return d;
- d = uvuni_to_utf8(d, (lindex + Hangul_LBase));
- d = uvuni_to_utf8(d, (vindex + Hangul_VBase));
+ d = uvchr_to_utf8(d, (lindex + Hangul_LBase));
+ d = uvchr_to_utf8(d, (vindex + Hangul_VBase));
if (tindex)
- d = uvuni_to_utf8(d, (tindex + Hangul_TBase));
+ d = uvchr_to_utf8(d, (tindex + Hangul_TBase));
return d;
}
@@ -231,7 +244,7 @@ U8* pv_utf8_decompose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool iscom
while (p < e) {
STRLEN retlen;
- UV uv = utf8n_to_uvuni(p, e - p, &retlen, AllowAnyUTF);
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
if (!retlen)
croak(ErrRetlenIsZero, "decompose");
p += retlen;
@@ -251,7 +264,7 @@ U8* pv_utf8_decompose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool iscom
}
else {
Renew_d_if_not_enough_to(UTF8_MAXLEN)
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
}
}
}
@@ -276,7 +289,7 @@ U8* pv_utf8_reorder(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen)
while (p < e) {
U8 curCC;
STRLEN retlen;
- UV uv = utf8n_to_uvuni(p, e - p, &retlen, AllowAnyUTF);
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
if (!retlen)
croak(ErrRetlenIsZero, "reorder");
p += retlen;
@@ -316,14 +329,14 @@ U8* pv_utf8_reorder(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen)
for (i = 0; i < cc_pos; i++) {
Renew_d_if_not_enough_to(UTF8_MAXLEN)
- d = uvuni_to_utf8(d, seq_ptr[i].uv);
+ d = uvchr_to_utf8(d, seq_ptr[i].uv);
}
cc_pos = 0;
}
if (curCC == 0) {
Renew_d_if_not_enough_to(UTF8_MAXLEN)
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
}
}
if (seq_ext)
@@ -353,7 +366,7 @@ U8* pv_utf8_compose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool isconti
while (p < e) {
U8 curCC;
STRLEN retlen;
- UV uv = utf8n_to_uvuni(p, e - p, &retlen, AllowAnyUTF);
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
if (!retlen)
croak(ErrRetlenIsZero, "compose");
p += retlen;
@@ -369,7 +382,7 @@ U8* pv_utf8_compose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool isconti
}
else {
Renew_d_if_not_enough_to(UTF8_MAXLEN)
- d = uvuni_to_utf8(d, uv);
+ d = uvchr_to_utf8(d, uv);
continue;
}
}
@@ -428,7 +441,7 @@ U8* pv_utf8_compose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool isconti
/* output */
{
Renew_d_if_not_enough_to(UTF8_MAXLEN)
- d = uvuni_to_utf8(d, uvS); /* starter (composed or not) */
+ d = uvchr_to_utf8(d, uvS); /* starter (composed or not) */
}
if (cc_pos) {
@@ -436,7 +449,7 @@ U8* pv_utf8_compose(pTHX_ U8* s, STRLEN slen, U8** dp, STRLEN dlen, bool isconti
for (i = 0; i < cc_pos; i++) {
Renew_d_if_not_enough_to(UTF8_MAXLEN)
- d = uvuni_to_utf8(d, seq_ptr[i]);
+ d = uvchr_to_utf8(d, seq_ptr[i]);
}
cc_pos = 0;
}
@@ -623,7 +636,7 @@ checkNFD(src)
preCC = 0;
for (p = s; p < e; p += retlen) {
- UV uv = utf8n_to_uvuni(p, e - p, &retlen, AllowAnyUTF);
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
if (!retlen)
croak(ErrRetlenIsZero, "checkNFD or -NFKD");
@@ -660,7 +673,7 @@ checkNFC(src)
preCC = 0;
for (p = s; p < e; p += retlen) {
- UV uv = utf8n_to_uvuni(p, e - p, &retlen, AllowAnyUTF);
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
if (!retlen)
croak(ErrRetlenIsZero, "checkNFC or -NFKC");
@@ -718,7 +731,7 @@ checkFCD(src)
U8 *sCan;
UV uvLead;
STRLEN canlen = 0;
- UV uv = utf8n_to_uvuni(p, e - p, &retlen, AllowAnyUTF);
+ UV uv = utf8n_to_uvchr(p, e - p, &retlen, AllowAnyUTF);
if (!retlen)
croak(ErrRetlenIsZero, "checkFCD or -FCC");
@@ -727,7 +740,7 @@ checkFCD(src)
if (sCan) {
STRLEN canret;
canlen = (STRLEN)strlen((char *) sCan);
- uvLead = utf8n_to_uvuni(sCan, canlen, &canret, AllowAnyUTF);
+ uvLead = utf8n_to_uvchr(sCan, canlen, &canret, AllowAnyUTF);
if (!canret)
croak(ErrRetlenIsZero, "checkFCD or -FCC");
}
@@ -758,7 +771,7 @@ checkFCD(src)
U8* pCan = utf8_hop(eCan, -1);
if (pCan < sCan)
croak(ErrHopBeforeStart);
- uvTrail = utf8n_to_uvuni(pCan, eCan - pCan, &canret, AllowAnyUTF);
+ uvTrail = utf8n_to_uvchr(pCan, eCan - pCan, &canret, AllowAnyUTF);
if (!canret)
croak(ErrRetlenIsZero, "checkFCD or -FCC");
preCC = getCombinClass(uvTrail);
@@ -801,8 +814,8 @@ isComp2nd(uv)
ALIAS:
isNFC_MAYBE = 1
isNFKC_MAYBE = 2
-
-
+ INIT:
+ PERL_UNUSED_VAR(ix);
SV*
isNFD_NO(uv)
@@ -897,7 +910,7 @@ splitOnLastStarter(src)
p = utf8_hop(p, -1);
if (p < s)
croak(ErrHopBeforeStart);
- uv = utf8n_to_uvuni(p, e - p, NULL, AllowAnyUTF);
+ uv = utf8n_to_uvchr(p, e - p, NULL, AllowAnyUTF);
if (getCombinClass(uv) == 0) /* Last Starter found */
break;
}
diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/mkheader b/gnu/usr.bin/perl/cpan/Unicode-Normalize/mkheader
index 6b4b9b9f9c3..8d4c1b8e8db 100644
--- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/mkheader
+++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/mkheader
@@ -22,6 +22,7 @@ use strict;
use warnings;
use Carp;
use File::Spec;
+use SelectSaver;
BEGIN {
unless ('A' eq pack('U', 0x41)) {
@@ -37,9 +38,15 @@ our $PACKAGE = 'Unicode::Normalize, mkheader';
our $prefix = "UNF_";
our $structname = "${prefix}complist";
-sub pack_U {
- return pack('U*', @_);
-}
+# Starting in v5.20, the tables in lib/unicore are built using the platform's
+# native character set for code points 0-255.
+*pack_U = ($] ge 5.020)
+ ? sub { return pack('W*', @_).pack('U*'); } # The empty pack returns
+ # an empty UTF-8 string,
+ # so the effect is to
+ # force the return into
+ # being UTF-8.
+ : sub { return pack('U*', @_); };
# %Canon and %Compat will be ($codepoint => $hexstring) after _U_stringify()
our %Comp1st; # $codepoint => $listname : may be composed with a next char.
@@ -64,7 +71,10 @@ our $Decomp = do "unicore/Decomposition.pl"
|| do "unicode/Decomposition.pl"
|| croak "$PACKAGE: Decomposition.pl not found";
-# CompositionExclusions.txt since Unicode 3.2.0
+# CompositionExclusions.txt since Unicode 3.2.0. If this ever changes, it
+# would be better to get the values from Unicode::UCD rather than hard-code
+# them here, as that will protect from having to make fixes for future
+# changes.
our @CompEx = qw(
0958 0959 095A 095B 095C 095D 095E 095F 09DC 09DD 09DF 0A33 0A36
0A59 0A5A 0A5B 0A5E 0B5C 0B5D 0F43 0F4D 0F52 0F57 0F5C 0F69 0F76
@@ -254,6 +264,9 @@ my @boolfunc = (
},
);
+my $orig_fh = SelectSaver->new;
+{
+
my $file = "unfexc.h";
open FH, ">$file" or croak "$PACKAGE: $file can't be made";
binmode FH; select FH;
@@ -400,5 +413,7 @@ EOF
close FH;
}
+} # End of block for SelectSaver
+
1;
__END__
diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/func.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/func.t
index 5e5be5de2b0..2bd6e504a32 100755
--- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/func.t
+++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/func.t
@@ -39,19 +39,25 @@ ok(1);
sub _pack_U { Unicode::Normalize::pack_U(@_) }
sub hexU { _pack_U map hex, split ' ', shift }
+# This won't work on EBCDIC platforms prior to v5.8.0, which is when this
+# translation function was defined
+*to_native = (defined &utf8::unicode_to_native)
+ ? \&utf8::unicode_to_native
+ : sub { return shift };
+
#########################
-ok(getCombinClass( 0), 0);
-ok(getCombinClass( 41), 0);
-ok(getCombinClass( 65), 0);
+ok(getCombinClass( to_native(0)), 0);
+ok(getCombinClass(to_native(41)), 0);
+ok(getCombinClass(to_native(65)), 0);
ok(getCombinClass( 768), 230);
ok(getCombinClass(1809), 36);
-ok(getCanon( 0), undef);
-ok(getCanon(0x29), undef);
-ok(getCanon(0x41), undef);
-ok(getCanon(0x00C0), _pack_U(0x0041, 0x0300));
-ok(getCanon(0x00EF), _pack_U(0x0069, 0x0308));
+ok(getCanon(to_native( 0)), undef);
+ok(getCanon(to_native(0x29)), undef);
+ok(getCanon(to_native(0x41)), undef);
+ok(getCanon(to_native(0x00C0)), _pack_U(0x0041, 0x0300));
+ok(getCanon(to_native(0x00EF)), _pack_U(0x0069, 0x0308));
ok(getCanon(0x304C), _pack_U(0x304B, 0x3099));
ok(getCanon(0x1EA4), _pack_U(0x0041, 0x0302, 0x0301));
ok(getCanon(0x1F82), _pack_U(0x03B1, 0x0313, 0x0300, 0x0345));
@@ -64,11 +70,11 @@ ok(getCanon(0xFA2D), _pack_U(0x9DB4));
# 20
-ok(getCompat( 0), undef);
-ok(getCompat(0x29), undef);
-ok(getCompat(0x41), undef);
-ok(getCompat(0x00C0), _pack_U(0x0041, 0x0300));
-ok(getCompat(0x00EF), _pack_U(0x0069, 0x0308));
+ok(getCompat(to_native( 0)), undef);
+ok(getCompat(to_native(0x29)), undef);
+ok(getCompat(to_native(0x41)), undef);
+ok(getCompat(to_native(0x00C0)), _pack_U(0x0041, 0x0300));
+ok(getCompat(to_native(0x00EF)), _pack_U(0x0069, 0x0308));
ok(getCompat(0x304C), _pack_U(0x304B, 0x3099));
ok(getCompat(0x1EA4), _pack_U(0x0041, 0x0302, 0x0301));
ok(getCompat(0x1F82), _pack_U(0x03B1, 0x0313, 0x0300, 0x0345));
@@ -81,17 +87,17 @@ ok(getCompat(0xFA2D), _pack_U(0x9DB4));
# 34
-ok(getComposite( 0, 0), undef);
-ok(getComposite( 0, 0x29), undef);
-ok(getComposite(0x29, 0), undef);
-ok(getComposite(0x29, 0x29), undef);
-ok(getComposite( 0, 0x41), undef);
-ok(getComposite(0x41, 0), undef);
-ok(getComposite(0x41, 0x41), undef);
-ok(getComposite(12, 0x0300), undef);
-ok(getComposite(0x0055, 0xFF00), undef);
-ok(getComposite(0x0041, 0x0300), 0x00C0);
-ok(getComposite(0x0055, 0x0300), 0x00D9);
+ok(getComposite(to_native( 0), to_native( 0)), undef);
+ok(getComposite(to_native( 0), to_native(0x29)), undef);
+ok(getComposite(to_native(0x29), to_native( 0)), undef);
+ok(getComposite(to_native(0x29), to_native(0x29)), undef);
+ok(getComposite(to_native( 0), to_native(0x41)), undef);
+ok(getComposite(to_native(0x41), to_native( 0)), undef);
+ok(getComposite(to_native(0x41), to_native(0x41)), undef);
+ok(getComposite(to_native(12), to_native(0x0300)), undef);
+ok(getComposite(to_native(0x0055), 0xFF00), undef);
+ok(getComposite(to_native(0x0041), 0x0300), to_native(0x00C0));
+ok(getComposite(to_native(0x0055), 0x0300), to_native(0x00D9));
ok(getComposite(0x0112, 0x0300), 0x1E14);
ok(getComposite(0x1100, 0x1161), 0xAC00);
ok(getComposite(0x1100, 0x1173), 0xADF8);
@@ -120,11 +126,11 @@ sub uprops {
return $r;
}
-ok(uprops(0x0000), 'xsnfbdmckyg'); # NULL
-ok(uprops(0x0029), 'xsnfbdmckyg'); # RIGHT PARENTHESIS
-ok(uprops(0x0041), 'xsnfbdmckyg'); # LATIN CAPITAL LETTER A
-ok(uprops(0x00A0), 'xsnfbdmcKyG'); # NO-BREAK SPACE
-ok(uprops(0x00C0), 'xsnfbDmcKyg'); # LATIN CAPITAL LETTER A WITH GRAVE
+ok(uprops(to_native(0x0000)), 'xsnfbdmckyg'); # NULL
+ok(uprops(to_native(0x0029)), 'xsnfbdmckyg'); # RIGHT PARENTHESIS
+ok(uprops(to_native(0x0041)), 'xsnfbdmckyg'); # LATIN CAPITAL LETTER A
+ok(uprops(to_native(0x00A0)), 'xsnfbdmcKyG'); # NO-BREAK SPACE
+ok(uprops(to_native(0x00C0)), 'xsnfbDmcKyg'); # LATIN CAPITAL LETTER A WITH GRAVE
ok(uprops(0x0300), 'xsnfBdMckYg'); # COMBINING GRAVE ACCENT
ok(uprops(0x0344), 'xsNFbDmCKyG'); # COMBINING GREEK DIALYTIKA TONOS
ok(uprops(0x0387), 'xSnFbDmCKyG'); # GREEK ANO TELEIA
@@ -266,12 +272,13 @@ ok(normalize('NFC', $2), "ABC");
# a string with initial zero should be treated like a number
# LATIN CAPITAL LETTER A WITH GRAVE
-ok(getCombinClass("0192"), 0);
-ok(getCanon ("0192"), _pack_U(0x41, 0x300));
-ok(getCompat("0192"), _pack_U(0x41, 0x300));
-ok(getComposite("065", "0768"), 192);
-ok(isNFD_NO ("0192"));
-ok(isNFKD_NO("0192"));
+ok(getCombinClass(sprintf("0%d", to_native(192))), 0);
+ok(getCanon (sprintf("0%d", to_native(192))), _pack_U(0x41, 0x300));
+ok(getCompat(sprintf("0%d", to_native(192))), _pack_U(0x41, 0x300));
+my $lead_zero = sprintf "0%d", to_native(65);
+ok(getComposite($lead_zero, "0768"), to_native(192));
+ok(isNFD_NO (sprintf("0%d", to_native(192))));
+ok(isNFKD_NO(sprintf("0%d", to_native(192))));
# DEVANAGARI LETTER QA
ok(isExclusion("02392"));
diff --git a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/illegal.t b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/illegal.t
index 70e63e3ccde..ccf2b4aae62 100755
--- a/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/illegal.t
+++ b/gnu/usr.bin/perl/cpan/Unicode-Normalize/t/illegal.t
@@ -59,7 +59,7 @@ ok(1);
no warnings qw(utf8);
for my $u (0xD800, 0xDFFF, 0xFDD0, 0xFDEF, 0xFEFF, 0xFFFE, 0xFFFF,
- 0x1FFFF, 0x10FFFF, 0x110000, 0x7FFFFFFF)
+ 0x1FFFF, 0x10FFFF, 0x110000, 0x3FFFFFFF)
{
my $c = chr $u;
ok($c eq NFD($c)); # 1