summaryrefslogtreecommitdiff
path: root/ext/Unicode
diff options
context:
space:
mode:
authorJarkko Hietaniemi <jhi@iki.fi>2002-02-27 00:50:55 +0000
committerJarkko Hietaniemi <jhi@iki.fi>2002-02-27 00:50:55 +0000
commitf96393037e3ac1f6245fc28e0b7b059261784e04 (patch)
tree65fed676b7347a179738d7192bba28d1078c8a14 /ext/Unicode
parent17fbd43944526821c6d4aa2cea5520c1a5824e96 (diff)
downloadperl-f96393037e3ac1f6245fc28e0b7b059261784e04.tar.gz
Unicode::Normalize 0.14 synch, from SADAHIRO Tomoyuki.
p4raw-id: //depot/perl@14888
Diffstat (limited to 'ext/Unicode')
-rw-r--r--ext/Unicode/Normalize/Changes14
-rw-r--r--ext/Unicode/Normalize/Normalize.pm4
-rw-r--r--ext/Unicode/Normalize/Normalize.xs17
-rw-r--r--ext/Unicode/Normalize/README36
-rw-r--r--ext/Unicode/Normalize/t/func.t4
-rw-r--r--ext/Unicode/Normalize/t/test.t9
6 files changed, 61 insertions, 23 deletions
diff --git a/ext/Unicode/Normalize/Changes b/ext/Unicode/Normalize/Changes
index 4426648ed3..35c1b9459b 100644
--- a/ext/Unicode/Normalize/Changes
+++ b/ext/Unicode/Normalize/Changes
@@ -1,5 +1,19 @@
Revision history for Perl extension Unicode::Normalize.
+0.14 Sat Feb 02 20:40:14 2002
+ - synchronization with bleadperl.
+ - Change 14128: by Arthur
+ - Change 14129: by jhi
+ - Change 14156:
+ - Change 14199: by Nikola Knezevic
+ - Change 14308: by Benjamin Goldberg
+ - Change 14370: by jhi
+
+0.13 Sat Dec 01 11:42:43 2001
+ - modify Makefile.PL to enable rebuild.
+ (This problem is pointed out by David Dyck.)
+ - Change 13388: by Jarkko Hietaniemi.
+
0.12 Wed Nov 29 22:49:02 2001
- documentation in .pod is appended to .pm and the .pod is removed.
(only POD in NON-XS refers to Lingua::KO::Hangul::Util.)
diff --git a/ext/Unicode/Normalize/Normalize.pm b/ext/Unicode/Normalize/Normalize.pm
index db173c527f..cec5fa70b3 100644
--- a/ext/Unicode/Normalize/Normalize.pm
+++ b/ext/Unicode/Normalize/Normalize.pm
@@ -11,7 +11,7 @@ use strict;
use warnings;
use Carp;
-our $VERSION = '0.13';
+our $VERSION = '0.14';
our $PACKAGE = __PACKAGE__;
require Exporter;
@@ -168,7 +168,7 @@ SADAHIRO Tomoyuki, E<lt>SADAHIRO@cpan.orgE<gt>
http://homepage1.nifty.com/nomenclator/perl/
- Copyright(C) 2001, SADAHIRO Tomoyuki. Japan. All rights reserved.
+ Copyright(C) 2001-2002, SADAHIRO Tomoyuki. Japan. All rights reserved.
This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff --git a/ext/Unicode/Normalize/Normalize.xs b/ext/Unicode/Normalize/Normalize.xs
index 0b0809e50d..7a11095c24 100644
--- a/ext/Unicode/Normalize/Normalize.xs
+++ b/ext/Unicode/Normalize/Normalize.xs
@@ -16,9 +16,9 @@
#endif /* uvuni_to_utf8 */
/* Perl 5.6.1 ? */
-#ifndef utf8n_to_uvchr
-#define utf8n_to_uvchr utf8_to_uv
-#endif /* utf8n_to_uvchr */
+#ifndef utf8n_to_uvuni
+#define utf8n_to_uvuni utf8_to_uv
+#endif /* utf8n_to_uvuni */
/* At present, char > 0x10ffff are unaffected without complaint, right? */
#define VALID_UTF_MAX (0x10ffff)
@@ -172,7 +172,7 @@ decompose(arg, compat = &PL_sv_no)
s = (U8*)SvPV(src,srclen);
e = s + srclen;
for(p = s; p < e;){
- uv = utf8n_to_uvchr(p, e - p, &retlen, 0);
+ uv = utf8n_to_uvuni(p, e - p, &retlen, 0);
p += retlen;
if(Hangul_IsS(uv)) sv_cat_decompHangul(dst, uv);
else {
@@ -211,7 +211,7 @@ reorder(arg)
U8 *cc_in;
STRLEN cc_len, cc_iter, cc_pos;
- uv = utf8n_to_uvchr(p, e - p, &retlen, 0);
+ uv = utf8n_to_uvuni(p, e - p, &retlen, 0);
curCC = getCombinClass(uv);
p += retlen;
@@ -223,7 +223,7 @@ reorder(arg)
stk_cc[cc_pos].pos = cc_pos;
while(p < e) {
- uv = utf8n_to_uvchr(p, e - p, &retlen, 0);
+ uv = utf8n_to_uvuni(p, e - p, &retlen, 0);
curCC = getCombinClass(uv);
if(!curCC) break;
p += retlen;
@@ -288,7 +288,7 @@ compose(arg)
for(p = s; p < e;){
if(beginning) {
- uvS = utf8n_to_uvchr(p, e - p, &retlen, 0);
+ uvS = utf8n_to_uvuni(p, e - p, &retlen, 0);
p += retlen;
if (getCombinClass(uvS)){ /* no Starter found yet */
@@ -304,7 +304,7 @@ compose(arg)
/* to the next Starter */
while(p < e) {
- uv = utf8n_to_uvchr(p, e - p, &retlen, 0);
+ uv = utf8n_to_uvuni(p, e - p, &retlen, 0);
p += retlen;
curCC = getCombinClass(uv);
@@ -345,7 +345,6 @@ compose(arg)
}
uvS = uv;
} /* for */
-
SvCUR_set(dst, d - (U8*)SvPVX(dst));
RETVAL = dst;
OUTPUT:
diff --git a/ext/Unicode/Normalize/README b/ext/Unicode/Normalize/README
index 96c456a592..2404f2fb1d 100644
--- a/ext/Unicode/Normalize/README
+++ b/ext/Unicode/Normalize/README
@@ -1,4 +1,4 @@
-Unicode/Normalize version 0.12
+Unicode/Normalize version 0.14
===================================
Unicode::Normalize - normalized forms of Unicode text
@@ -40,6 +40,15 @@ type the following:
make test
make install
+If you decide to install the NoXS version after trying to build the XS,
+type the following:
+
+ make clean
+ perl Makefile.PL noxs
+ make
+ make test
+ make install
+
DEPENDENCIES
This module requires these other modules and libraries:
@@ -48,12 +57,23 @@ Carp
Exporter
File::Copy
File::Spec
-unicore/CombiningClass.pl or unicode/CombiningClass.pl
-unicore/Decomposition.pl or unicode/Decomposition.pl
-unicore/CompositionExclusions.txt or unicode/CompExcl.txt
-and for the Non-XS version, in addition to the above,
-Lingua::KO::Hangul::Util 0.06
+unicore/CombiningClass.pl
+ (or unicode/CombiningClass.pl)
+unicore/Decomposition.pl
+ (or unicode/Decomposition.pl)
+unicore/CompositionExclusions.txt
+ (or unicode/CompExcl.txt)
+
+# CAVEAT:
+# In bleadperl, unicore/CompExcl.txt is renamed
+# unicore/CompositionExclusions.txt.
+
+And for the NoXS version, in addition to the above,
+
+ Lingua::KO::Hangul::Util 0.06
+
+is required.
COPYRIGHT AND LICENCE
@@ -61,8 +81,8 @@ SADAHIRO Tomoyuki, E<lt>SADAHIRO@cpan.orgE<gt>
http://homepage1.nifty.com/nomenclator/perl/
- Copyright(C) 2001, SADAHIRO Tomoyuki. Japan. All rights reserved.
+ Copyright(C) 2001-2002, SADAHIRO Tomoyuki. Japan. All rights reserved.
- This program is free software; you can redistribute it and/or
+ This program is free software; you can redistribute it and/or
modify it under the same terms as Perl itself.
diff --git a/ext/Unicode/Normalize/t/func.t b/ext/Unicode/Normalize/t/func.t
index 6f0ff08120..c436a7c3dd 100644
--- a/ext/Unicode/Normalize/t/func.t
+++ b/ext/Unicode/Normalize/t/func.t
@@ -66,8 +66,8 @@ print ! defined getComposite( 0, 0)
&& 0x1E14 == getComposite(0x0112, 0x0300)
&& 0xAC00 == getComposite(0x1100, 0x1161)
&& 0xADF8 == getComposite(0x1100, 0x1173)
- && ! getComposite(0x1100, 0x11AF)
- && ! getComposite(0x1173, 0x11AF)
+ && ! defined getComposite(0x1100, 0x11AF)
+ && ! defined getComposite(0x1173, 0x11AF)
&& 0xAE00 == getComposite(0xADF8, 0x11AF)
? "ok" : "not ok", " 5\n";
diff --git a/ext/Unicode/Normalize/t/test.t b/ext/Unicode/Normalize/t/test.t
index 198bf071bb..fe42aae641 100644
--- a/ext/Unicode/Normalize/t/test.t
+++ b/ext/Unicode/Normalize/t/test.t
@@ -49,5 +49,10 @@ ok(hexNFC("0000 0041 0000 0000"), "0000 0041 0000 0000");
ok(hexNFD("0000 0041 0000 0000"), "0000 0041 0000 0000");
# should be unary.
-ok(NFC "\x{41}\x{0302}\x{0301}\x62" eq "\x{1EA4}\x62");
-ok(NFD "\x{E0}\x{AC00}" eq "\x{61}\x{0300}\x{1100}\x{1161}");
+my $str11 = pack('U*', 0x41, 0x0302, 0x0301, 0x62);
+my $str12 = pack('U*', 0x1EA4, 0x62);
+ok(NFC $str11 eq $str12);
+
+my $str21 = pack('U*', 0xE0, 0xAC00);
+my $str22 = pack('U*', 0x61, 0x0300, 0x1100, 0x1161);
+ok(NFD $str21 eq $str22);