I have an script in R
named myplots.R
, that produce a few plots (graphs, etc).
If I call this script with Rscript from the Linux SHELL:
Rscript myplots.R
It create my plots correctly, showing accents, tildes, special chars, etc.
Then, in PHP I call to:
$a=shell_exec("/usr/bin/Rscript myplots.R");
It's working, but accents/tildes, special chars, etc are showed like
Where it must be:
(Predicción -
PHP file that call to shell_exec has:
header('Content-Type: text/html; charset=UTF-8');
and all my files in R use:
Sys.setlocale("LC_TIME", "es_ES.utf8")
Thanks in advance