Why matlab is not able to process greek characters from .m files but it can do it from command line?
2 visualizaciones (últimos 30 días)
Mostrar comentarios más antiguos
Anurag Gupta
el 21 de Nov. de 2017
Comentada: Anurag Gupta
el 21 de Nov. de 2017
Example: c=double('α');
When I write this in a matlab file and run the code it gives output as 63, representing '?'(ASCII value 63). However, when I run the same from matlab command line, it gives value of c as 945. Same happens with file reading too. It reads 'α' as '?'.
How can I read the same from matlab files too?
0 comentarios
Respuesta aceptada
Walter Roberson
el 21 de Nov. de 2017
If you are using MS Windows or Mac, then if your system locale is not set to english, then in current releases, MATLAB starts in a mode that is able to read and write UTF-8 encoded .m files. https://www.mathworks.com/help/matlab/internationalization.html.
MATLAB does not do this if your locale is set to English, and I am not sure if it does it on Linux at all.
3 comentarios
Walter Roberson
el 21 de Nov. de 2017
Maybe; I am not certain whether it worked in R2015* but see https://www.mathworks.com/matlabcentral/answers/280988-how-do-i-get-my-matlab-editor-to-read-utf-8-characters-utf-8-characters-in-blank-squares-in-editors#answer_239883
Más respuestas (0)
Ver también
Categorías
Más información sobre Environment and Settings en Help Center y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!