[Israel.pm] 8-bit characters recognition

Roman M. Parparov romm at empire.tau.ac.il
Wed May 19 05:38:14 PDT 2004


On Wed, May 19, 2004 at 03:35:25PM +0300, Shlomi Fish wrote:
> On Wednesday 19 May 2004 15:03, Roman M. Parparov wrote:
> > Hello,
> >
> > What would be a simple way to recognize if an 8-bit (ord($c) > 0x7f)
> > character is present in a string?
> 
> if ($string =~ /[\x7F-\xFF]/)
> {
> 	print "There's a high charactre in your string\n";
> }
> 
> Don't ask me what happens with locales and stuff like that.
> 
> Regards,
> 
> 	Shlomi Fish

Thank you!

-- 
Roman M. Parparov - NASA EOSDIS project node at TAU technical manager.
Email: romm at empire.tau.ac.il		   http://www.nasa.proj.ac.il/
Phone/Fax: +972-(0)3-6405205 (work),         +972-(0)51-34-18-34 (home)
----------------------------------------------------------------------
The economy depends about as much on economists as the weather does on
weather forecasters.
                -- Jean-Paul Kauffmann



More information about the Perl mailing list