Matlab打开有中文的m文件中文注释显示为乱码
37 ビュー (過去 30 日間)
古いコメントを表示
版本为R2021b,系统是macOS12.2,看到网上说要把编码方式encoding改为UTF-8,但是我的Matlab本来就是UTF-8编码。![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/896040/image.png)
![](https://www.mathworks.com/matlabcentral/answers/uploaded_files/896040/image.png)
0 件のコメント
回答 (1 件)
Varun
2024 年 1 月 31 日
你好 ProudBenzene,
我将用英语回答这个问题。
Looks like you are facing issue with Chinese comments when you open a “.m” file. The characters are displayed as garbled text in MATLAB, even though the encoding is already set to UTF-8.
You can try changing the MATLAB Desktop language to Chinese by following below MATLAB documentation:
If this did not resolve the issue, you can also refer to similar MATLAB Answers post:
“Why won't the editor display Chinese characters?”: https://www.mathworks.com/matlabcentral/answers/301283-why-won-t-the-editor-display-chinese-characters
Hope it helps.
0 件のコメント
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!