Report plugins - UTF-8 characters


He visto en varias revistas que al momento de obtener los reportes en idioma español, estos salen con caracteres raros, el csv no muestra los acentos o eñes de forma correcta. He agregado la siguiente línea de código fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); justo después de $fp = fopen(‘php://output’, ‘wt’); y ahora los reportes muestran la información correctamente. He realizado este ajuste en:


I’ve seen in some journals that the reports in spanish have errors with áéíóú or ñ, for example. So, I’ve added this code fprintf($fp, chr(0xEF).chr(0xBB).chr(0xBF)); just after of $fp = fopen(‘php://output’, ‘wt’); and now the reports show the information correctly. These are the modified scripts:



Hola @lopez.casique,

That sounds like a useful addition – I use OpenOffice, which interprets UTF-8 content without problems, but we’ve heard that some Excel users have trouble with accented characters.

Looking at this StackOverflow thread, you should be able to use $BOM instead of manually coding the hex sequence.

Would you be able to submit this as a pull request via github? It would be best sent to the ojs-stable-2_4_8 branch of the OJS repository.

Alec Smecher
Public Knowledge Project Team

Hi @asmecher:

I think that MS Office is more popular than OpenOffice, in Mexico is very common that people have Windows =/ .

Thank you for the StackOverflow thread, I modified the scripts with $BOM and worked !

I have never submitted a pull request but I’ll try.