-
首先查找matlab的安装根目录,在matlab工作区中输入:
matlabroot
可以看到目录为
/Applications/Polyspace/R2020a
-
进入安装目录中:
cd /Applications/Polyspace/R2020a/bin
-
修改
cdata_utf8.xml
文件cp lcdata_utf8.xml lcdata_utf8_bac.xml open lcdata_utf8.xml
然后在打开的文件中:
删除<encoding name="GBK"> < encoding_alias name="936"> </encoding>
修改
<encoding name="UTF-8"> <encoding_alias name="utf8"/> </encoding>
为
<encoding name="UTF-8"> <encoding_alias name="utf8"/> <encoding_alias name="GBK"/> </encoding>
最后覆盖掉
cp lcdata.xml lcdata_bac.xml sudo mv lcdata_utf8.xml lcdata.xml
-
重启matlab即可