I am writing a Scilab book in Portuguese language using ISO-8859-1 character encoding. However, all my Scilab codes are written in UTF-8 encoding. So when I write:
Code: Select all
\lstinputlisting[language=scilab]{./codescilab/ex01angulo.sce}
Code: Select all
//limpando a memoria e o console do scilab
clear;
clc;
//constante pi
pi = 3.141592;
//os comandos printf, mprintf e disp escrevem no console
mprintf("Programa para converter graus decimais em radianos. \n\n");
//nao é necessário declarar uma variável e seu tipo
ang = input("Digite um angulo em graus decimais: ");
//transformando o angulo em radianos
rad = ang*(pi)/(180);
//escrevendo o resultado no console
printf("%f graus corresponde a %f radianos",ang,rad);
In sum: All the accents work perfectly on all my texts due to the ISO-8859-1 encoding. Just the codes that come from a .sce (Scilab) file have those weird symbols instead of the accents. How can I solve that problem? Thanks in advance.
Regards.