[Israel.pm] substitute hebrew letter

Gaal Yahas gaal at forum2.org
Fri Jun 15 12:23:14 PDT 2012


FWIW, BOM is not recommended for UTF-8.

Shlomit: you can also avoid literal Unicode in your source code altogether
and say:

  s/\x{05de}//g;  # Mem == U+05de

Of course, we're assuming your strings are unicode. If that's not the case,
and you're using ISO-8859-8 instead, you need another mem:

  s/\x{ee}//g;  # Mem == 238 or 0xee

On Fri, Jun 15, 2012 at 8:33 PM, Meir Guttman <meir at guttman.co.il> wrote:

>
>
> > -----Original Message-----
> > From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
> > Behalf Of Meir Guttman
> > Sent: Friday, June 15, 2012 12:13 AM
> > To: 'Perl in Israel'
> > Subject: Re: [Israel.pm] substitute hebrew letter
> >
> > > -----Original Message-----
> > > From: perl-bounces at perl.org.il [mailto:perl-bounces at perl.org.il] On
> > > Behalf Of Issac Goldstand
> > > Sent: Thursday, June 14, 2012 5:39 PM
> > > To: Perl in Israel
> > > Subject: Re: [Israel.pm] substitute hebrew letter
> > >
> > > Are you "use utf8"-ing or have a the source code saved as utf8 with a
> > > BOM?  You'll need one or the other to use utf8 literals in the source
> > > code...
> > >
> > >   Yitzchak
> > >
> >
> > Hi Shlomit!
> > If Unicode text is part of the Perl program, you MUST place the «use
> > utf8;» pragma in it! No ifs and buts! Saving the file as utf8, with or
> > without a BOM (Byte Order Marker) has no bearing on your program
> > whatsoever!
>
> Correction!
> The file MUST be saved as utf8 of course (otherwise the «use utf8» is
> simply wrong!)
> Bur BOM or no BOM, it doesn't matter.
> Meir
>
> > Look up http://perldoc.perl.org/5.10.1/utf8.html (or the same for your
> > Perl version).
> > Also looking up the Perl Unicode tutorial
> > http://perldoc.perl.org/5.10.1/perlunitut.html could help.
> > If you will give me an e-mail address I'll send you a presentation
> > about "Unicode aspects in Perl" I gave awhile ago. (This list does not
> > care for attachments...) It will have some useful info I believe.
> >
> > Regards
> > Meir
> >
> >
> > > On 14/06/2012 17:29, Shlomit Afgin wrote:
> > > >
> > > > Hello,
> > > > I'm trying to substitute letter in hebrew and It's do nothing.
> > > > I'm doing:
> > > > $str =~ s/מ//g;
> > > > And all the מ's still exist.
> > > >
> > > > How can I substitute a hebrew letters?
> > > >
> > > >
> > > > _______________________________________________
> > > > Perl mailing list
> > > > Perl at perl.org.il
> > > > http://mail.perl.org.il/mailman/listinfo/perl
> > >
> > > _______________________________________________
> > > Perl mailing list
> > > Perl at perl.org.il
> > > http://mail.perl.org.il/mailman/listinfo/perl
> > > No virus found in this incoming message.
> > > Checked by AVG - www.avg.com
> > > Version: 9.0.930 / Virus Database: 2433.1.1/5068 - Release Date:
> > > 06/13/12 21:34:00
> >
> > _______________________________________________
> > Perl mailing list
> > Perl at perl.org.il
> > http://mail.perl.org.il/mailman/listinfo/perl
> > No virus found in this incoming message.
> > Checked by AVG - www.avg.com
> > Version: 9.0.930 / Virus Database: 2433.1.1/5068 - Release Date:
> > 06/14/12 09:34:00
>
> _______________________________________________
> Perl mailing list
> Perl at perl.org.il
> http://mail.perl.org.il/mailman/listinfo/perl
>



-- 
Gaal Yahas <gaal at forum2.org>
http://gaal.livejournal.com/
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://mail.perl.org.il/pipermail/perl/attachments/20120615/d2e9bc24/attachment.htm 


More information about the Perl mailing list