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

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


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 - é and those usually are trasnffered to
jibrish here is a simple script to fix it

sub convert_entities_to_ascii
{

    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;


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