in reply to matching german characters output from system call.

You need to change the encoding from DOS cp437 (assuming English codepage) to Latin-1 or utf-8.

use Encode; my $result = `ping -n 1 "jenda.krynicy.cz" ` . "\n"; print "result: $result\n\n"; my $latinresult = $result; Encode::from_to($latinresult, 'cp437', 'iso-8859-1'); if ($latinresult =~ /zeitüberschreitung/i) { #ping timed out, something is wrong with the repository print "Ping timed out for $domain: \n\n $result \n\n"; } else { #good repository. print "$domain passed ping: \n"; print `ppm repository add $repository $location` . "\n\n"; }

Note: this only addresses the encoding problem, there are several other potential problems with the script

Replies are listed 'Best First'.
Re^2: matching german characters output from system call.
by tphyahoo (Vicar) on May 13, 2005 at 12:27 UTC