[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: OT: strip hebrew vowels and accents from utf-8 text



On Thu, Nov 05, 2009 at 04:00:59PM -0500, Celejar wrote:
> > Can anyone suggest a simple way to strip vowels out of utf-8 encoded
> > hebrew text, leaving just the consenants?
> 
> #! /usr/bin/perl -w
> 
> use strict;
> use Encode;
> 
> while (<>) {
> 	$_ = Encode::decode('utf-8', $_);
> 	s/[\x{0591}-\x{05C7}]//g;
> 	print Encode::encode('utf-8', $_);
> }

Perfect. Thanks, muchly.

David

-- 
David Purton
dcpurton@marshwiggle.net
 
For the eyes of the LORD range throughout the earth to
strengthen those whose hearts are fully committed to him.
                                 2 Chronicles 16:9a

Attachment: signature.asc
Description: Digital signature


Reply to: