develooper Front page | perl.perl5.porters | Postings from December 2010

Re: [perl #80030] Matching upper ASCII characters from file in RE patterns

Thread Previous | Thread Next
From:
Jonathan Pool
Date:
December 10, 2010 18:14
Subject:
Re: [perl #80030] Matching upper ASCII characters from file in RE patterns
Message ID:
3E027E62-EB8A-48B7-A529-A9E646364CAB@utilika.org
> So, is it possible for the source code (in a UTF-8 file) to use \x80 (or any numeric \x escape) to represent the character U+0080?
> 
> C2 80 is the UTF-8 encoding of U+0080, so the following are equivalent:
> 
> $x = "\x80";
> 
> and
> 
> use encoding 'UTF-8';
> $x = "\xC2\x80";
> 
> (Except perhaps in how the UTF8 flag is set, but that's not suppose to make a difference.)
> 
> - Eric

Could the latter representation (\xc2\x80) appear in a regular-expression character class, too?
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