Unicode characters in MATLAB source files

后端 未结 5 1536
执笔经年
执笔经年 2020-11-30 05:55

I\'d like to use Unicode characters in comments in a MATLAB source file. This seems to work when I write the text; however, if I close the file and reload it, \"unusual\" ch

5条回答
  •  心在旅途
    2020-11-30 06:14

    For Mac OS users, Jendker's solution really helps!!! Thanks a lot first.

    Recap here.

    1. Check the default language in Matlab by typing in the command window getenv('LANG'). Mine returned en_US.ISO8859-1.

    2. In the Application directory find Matlab, show its package contents. Go to bin, open lcdata.xml as an administrator, locate the corresponding xpg_name, in my case en_US.ISO8859-1. Change encoding in the same line to UTF-8. Save it.

    3. Restart Matlab, and it's all done!

提交回复
热议问题