- Messages
- 5,508
- Reaction score
- 35
- Points
- 48
Ok I am doing a app with shell_exec, and it does not work properly in a swedish OS because someone decided to make the output ascii and not utf8.
How would I go about replacing all missing charachters with right characters?
Like if I do:
$output = shell_exec('ping västtrafik.se);
echo $output;
It prints:
v��sttrafik.se
$output = shell_exec($cmd);
$output = utf8_encode($output);
echo $output;
it prints:
vÇÏsttrafik.se
so how would I get it to print
västtrafik.se?
How would I go about replacing all missing charachters with right characters?
Like if I do:
$output = shell_exec('ping västtrafik.se);
echo $output;
It prints:
v��sttrafik.se
$output = shell_exec($cmd);
$output = utf8_encode($output);
echo $output;
it prints:
vÇÏsttrafik.se
so how would I get it to print
västtrafik.se?