develooper Front page | perl.perl5.porters | Postings from September 2000

Re: unicode support and perl

Thread Previous | Thread Next
From:
Spider Boardman
Date:
September 15, 2000 11:03
Subject:
Re: unicode support and perl
Message ID:
200009151803.OAA10417@Orb.Nashua.NH.US
The real fix for the regexp-related ones is to fix the regexp
internal opcodes to be polymorphic with respect to utf8-ness.
The way it works right now is not acceptable.  I don't know
whether I'll get time to work on it any time soon, though.

	#! perl
	print "1..4\n";
	$_="\xff\xf3";
	s/\xff//;
	print "not " unless $_ eq "\xf3";
	print "ok 1\n";
	$_="\xff\x{1f3}";
	s/\xff//;
	print "not " unless $_ eq "\xf3";
	print "ok 2\n";
	{
	    use utf8;
	    $_="\xff\xf3";
	    s/\xff//;
	    print "not " unless $_ eq "\xf3";
	    print "ok 3\n";
	    $_="\xff\x{1f3}";
	    s/\xff//;
	    print "not " unless $_ eq "\xf3";
	    print "ok 4\n";
	}

Hmm.  50% ain't all that good.  Fixing this will require that we
fix $1 et al as well.

	--s.

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