How do I change the default encoding of MATLAB?

55 次查看(过去 30 天)
I opened the.m file that someone sent me and found that the Chinese characters inside were garbled.
I want to change the default encoding mode of matlab. The encoding mode of my matlab is GBK, and I want to change it to UTF-8.

采纳的回答

Garv Agarwal
Garv Agarwal 2023-7-24
Hi 涛,
From my understanding, you want to change the default encoding of your MATLAB to UTF-8.
You can do this by running the following command -
feature('DefaultCharacterSet', 'UTF8')
  3 个评论
Garv Agarwal
Garv Agarwal 2023-7-24
Hi 涛,
You can change the encoding to GBK in a similar way -
feature('DefaultCharacterSet', 'GBK')

请先登录,再进行评论。

更多回答(0 个)

类别

Help CenterFile Exchange 中查找有关 Programming 的更多信息

产品


版本

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by