Front page | perl.perl6.language |
Postings from August 2006
Re: === and array-refs
Thread Previous
|
Thread Next
From:
Larry Wall
Date:
August 16, 2006 15:12
Subject:
Re: === and array-refs
Message ID:
20060816221159.GA20184@wall.org
On Wed, Aug 16, 2006 at 04:25:13PM +0200, Dr.Ruud wrote:
: Comparing strings in Perl5, using NFKD:
:
: perl5 -MUnicode::Normalize -we '
: ($\, $,) = ("\n", "\t") ;
: $x = qq{Henry IV} ;
: $y = qq{Henry \x{2163}} ;
: print qq{<$x>}, qq{<$y>}, length $x, length $y, $x eq $y ? 1 : 0 ;
: # $x = NFKD $x ;
: $y = NFKD $y ;
: print qq{<$x>}, qq{<$y>}, length $x, length $y, $x eq $y ? 1 : 0 ;
: '
: Wide character in print at -e line 5.
: <Henry IV> <Henry �.�> 8 7 0
: <Henry IV> <Henry IV> 8 8 1
:
:
: How will the Str type do this?
That'd just be:
eqv($x, $y, :(NFKD $^s))
or some such, give or take a little notation in the signature to force MMD
to match a Str and coerce to NFKD. This is mentioned in S03 as a subproblem
of the general canonicalization/collation problem. It should be using the
same underlying semantics as
cmp($x, $y, :(NFKD $_))
or
sort :(NFKD $_), @strings;
Larry
Thread Previous
|
Thread Next
-
===, =:=, ~~, eq and == revisited (blame ajs!)
by Yuval Kogman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Yuval Kogman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by David Green
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Larry Wall
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Smylers
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Charles Bailey
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!) -- Explained
by Jonathan Lang
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Darren Duncan
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Aaron Sherman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Yuval Kogman
-
Re: ===, =:=, ~~, eq and == revisited (blame ajs!)
by Yuval Kogman