0

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

enter image description here

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

ManuParra
  • 1,471
  • 6
  • 18
  • 33
  • What do you mean that the values aren't shown. Are you printing the content of "$a" into the page or something? Does the R script itself actually run? Are you just having a problem with the HTML generated by PHP? Are these values in the images themselves? – MrFlick Jun 24 '14 at 18:14
  • Not showed correctly. For instance, this character ñ is changed to .. – ManuParra Jun 24 '14 at 20:48

0 Answers0