develooper Front page | perl.perl5.porters | Postings from January 2001

Re: more UTF8 test suites and an UTF8 patch

Thread Previous | Thread Next
From:
Simon Cozens
Date:
January 4, 2001 12:01
Subject:
Re: more UTF8 test suites and an UTF8 patch
Message ID:
20010104193716.A2490@deep-dark-truthful-mirror.perlhacker.org
On Sat, Dec 30, 2000 at 12:14:44AM -0600, Jarkko Hietaniemi wrote:
[unicode::distinct]
> >   Now any string which is SvUTF_off is equal to another string which
> >   is SvUTF_on. `eq' can't distingush them.  This pragma forces all
> >   SvUTF_on string differ to any SvUTF_off string.
> 
> Ummmm.  Introducing new pragmas should be considered carefully.
> Can you give an example of how to use this pragma?  What problem
> does it solve?

Just one second! What's the difference between:

    $a = v50.400; chop $a;
    $b = chr(50);
    
    print "Two chr(50)s are the same, no suprise" if $a eq $b

    {
        use unicode::distinct;
        print "Shouldn't be the same now" if $a eq $b;
    }

and

    {
        use bytes;
        print "Shouldn't be the same now" if $a eq $b;
    }

Seems to me the whole idea is what the bytes pragma is for.

-- 
``Perl is the successfull attempt to make a braindump directly
executable.''
    - Lutz Donnerhacke in de.org.ccc

Thread Previous | Thread Next


nntp.perl.org: Perl Programming lists via nntp and http.
Comments to Ask Bjørn Hansen at ask@perl.org | Group listing | About