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 = (
'"' => '"',
'<' => '<',
'>' => '>',
'&' => ' & ', # prevents &network => &ne ...
' ' => ' ', # non-breaking space (decimal 160)
'à' => "\xE0",
"á" => "\xE1",
"â" => "\xE2",
"ã" => "\xE3",
"ä" => "\xE4",
"å" => "\xE5",
"Æ" => "\xE6",
"ç" => "\xE7",
"è" => "\xE8",
"é" => "\xE9",
"ê" => "\xEA",
"ë" => "\xEB",
"ì" => "\xEC",
"í" => "\xED",
"î" => "\xEE",
"ï" => "\xEF",
"ð" => "\xF0",
"ñ" => "\xF1",
"ò" => "\xF2",
"ó" => "\xF3",
"ô" => "\xF4",
"õ" => "\xF5",
"ö" => "\xF6",
"ø" => "\xF8",
"ù" => "\xF9",
"ú" => "\xFA",
"û" => "\xFB",
"ü" => "\xFC",
"ý" => "\xFD",
"þ" => "\xFE",
"ÿ" => "\xFF",
'÷' => "\xF7",
'÷' => "\xF7");
# Substitute named entities
$text =~ s/(&[a-zA-Z]+;)/
exists $ENTITY{$1} ? $ENTITY{$1} : ''
/ge;
$text =~ s/&#([0-9]+);/pack("C",$1)/ge; # handle – sort of entities
return $text
}
On Wed, May 13, 2009 at 9:43 AM, Roey Almog (Infoneto Ltd)
<[email protected]> 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 - é and those usually are trasnffered to
> jibrish here is a simple script to fix it
>
> sub convert_entities_to_ascii
> {
>
> my (%ENTITY);
> %ENTITY = (
> '"' => '"',
> '<' => '<',
> '>' => '>',
> '&' => ' & ', # prevents &network => &ne ...
> ' ' => ' ', # non-breaking space (decimal 160)
> 'à' => "\xE0",
> "á" => "\xE1",
> "â" => "\xE2",
> "ã" => "\xE3",
> "ä" => "\xE4",
> "å" => "\xE5",
> "Æ" => "\xE6",
> "ç" => "\xE7",
> "è" => "\xE8",
> "é" => "\xE9",
> "ê" => "\xEA",
> "ë" => "\xEB",
> "ì" => "\xEC",
> "í" => "\xED",
> "î" => "\xEE",
> "ï" => "\xEF",
> "ð" => "\xF0",
> "ñ" => "\xF1",
> "ò" => "\xF2",
> "ó" => "\xF3",
> "ô" => "\xF4",
> "õ" => "\xF5",
> "ö" => "\xF6",
> "ø" => "\xF8",
> "ù" => "\xF9",
> "ú" => "\xFA",
> "û" => "\xFB",
> "ü" => "\xFC",
> "ý" => "\xFD",
> "þ" => "\xFE",
> "ÿ" => "\xFF",
> '÷' => "\xF7",
> '÷' => "\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 <[email protected]> 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
>> [email protected]
>> http://mail.perl.org.il/mailman/listinfo/perl
>
_______________________________________________
Perl mailing list
[email protected]
http://mail.perl.org.il/mailman/listinfo/perl