[Israel.pm] Hebrew on jobs.perl.org

Roey Almog (Infoneto Ltd) almog at infoneto.co.il
Tue May 12 23:54:07 PDT 2009


Any way to cut long story short it says -
LINUX Perl programmers with 3 years experience
Must know XML,XSL.SHELL SCRIPT
C++/C Advantage

And since I have pressed send before type every thing here is the script again:

sub convert_entities_to_ascii
{
   my ($text) = @_;
   my (%ENTITY);
   %ENTITY = (
              '"'   => '"',
              '&lt;'     => '<',
              '&gt;'     => '>',
              '&amp;'    => ' & ', # prevents &amp;network => &ne ...
              '&nbsp;'   => ' ',      # non-breaking space (decimal 160)
              '&agrave;' => "\xE0",
              "&aacute;" => "\xE1",
              "&acirc;"  => "\xE2",
              "&atilde;" => "\xE3",
              "&auml;"   => "\xE4",
              "&aring;"  => "\xE5",
              "&AElig;"  => "\xE6",
              "&ccedil;" => "\xE7",
              "&egrave;" => "\xE8",
              "&eacute;" => "\xE9",
              "&ecirc;"  => "\xEA",
              "&euml;"   => "\xEB",
              "&igrave;" => "\xEC",
              "&iacute;" => "\xED",
              "&icirc;"  => "\xEE",
              "&iuml;"   => "\xEF",
              "&eth;"    => "\xF0",
              "&ntilde;" => "\xF1",
              "&ograve;" => "\xF2",
              "&oacute;" => "\xF3",
              "&ocirc;"  => "\xF4",
              "&otilde;" => "\xF5",
              "&ouml;"   => "\xF6",
              "&oslash;" => "\xF8",
              "&ugrave;" => "\xF9",
              "&uacute;" => "\xFA",
              "&ucirc;"  => "\xFB",
              "&uuml;"   => "\xFC",
              "&yacute;" => "\xFD",
              "&thorn;"  => "\xFE",
              "&yuml;"   => "\xFF",
              '&div;'    => "\xF7",
              '&divide;' => "\xF7");

   # Substitute named entities
   $text =~ s/(&[a-zA-Z]+;)/
       exists $ENTITY{$1} ? $ENTITY{$1} : ''
   /ge;
   $text =~ s/&#([0-9]+);/pack("C",$1)/ge; # handle &#150 sort of entities

   return $text
}

On Wed, May 13, 2009 at 9:43 AM, Roey Almog (Infoneto Ltd)
<almog at infoneto.co.il> wrote:
> Gabor hi - I have solution for you
> 1. I'll contact the person who put the add and ask them to change it to English
> 2.The problem is that the site transfered the chars above ascii 127 to
> entities such as - &eacute; and those usually are trasnffered to
> jibrish here is a simple script to fix it
>
> sub convert_entities_to_ascii
> {
>
>    my (%ENTITY);
>    %ENTITY = (
>               '&quot;'   => '"',
>               '&lt;'     => '<',
>               '&gt;'     => '>',
>               '&amp;'    => ' & ', # prevents &amp;network => &ne ...
>               '&nbsp;'   => ' ',      # non-breaking space (decimal 160)
>               '&agrave;' => "\xE0",
>               "&aacute;" => "\xE1",
>               "&acirc;"  => "\xE2",
>               "&atilde;" => "\xE3",
>               "&auml;"   => "\xE4",
>               "&aring;"  => "\xE5",
>               "&AElig;"  => "\xE6",
>               "&ccedil;" => "\xE7",
>               "&egrave;" => "\xE8",
>               "&eacute;" => "\xE9",
>               "&ecirc;"  => "\xEA",
>               "&euml;"   => "\xEB",
>               "&igrave;" => "\xEC",
>               "&iacute;" => "\xED",
>               "&icirc;"  => "\xEE",
>               "&iuml;"   => "\xEF",
>               "&eth;"    => "\xF0",
>               "&ntilde;" => "\xF1",
>               "&ograve;" => "\xF2",
>               "&oacute;" => "\xF3",
>               "&ocirc;"  => "\xF4",
>               "&otilde;" => "\xF5",
>               "&ouml;"   => "\xF6",
>               "&oslash;" => "\xF8",
>               "&ugrave;" => "\xF9",
>               "&uacute;" => "\xFA",
>               "&ucirc;"  => "\xFB",
>               "&uuml;"   => "\xFC",
>               "&yacute;" => "\xFD",
>               "&thorn;"  => "\xFE",
>               "&yuml;"   => "\xFF",
>               '&div;'    => "\xF7",
>               '&divide;' => "\xF7");
>
>    # Substitute named entities
>    $$text =~ s/(&[a-zA-Z]+;)/
>        exists $ENTITY{$1} ? $ENTITY{$1} : ''
>    /ge;
>
>
> On Wed, May 13, 2009 at 9:02 AM, Gabor Szabo <szabgab at gmail.com> wrote:
>>
>> hi,
>>
>> I have just noticed this job posting http://jobs.perl.org/job/10402
>> which I guess is written in Hebrew but at least I can only see
>> other funny characters: úåëðéúðé
>>
>> I tried to set the encoding in my browser but it did not change a thing.
>> Any idea how could this be fixed ?
>>
>> I guess I'll need to contact  Ask Bjørn Hansen, the maintainer of the web
>> site to do something but before I contact him I wanted to get your
>> advice on what could be the solution ?
>>
>> Gabor
>> _______________________________________________
>> Perl mailing list
>> Perl at perl.org.il
>> http://mail.perl.org.il/mailman/listinfo/perl
>


More information about the Perl mailing list