How do I change the default encoding of MATLAB?

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.

 Réponse acceptée

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 commentaires

涛
le 24 Juil 2023
More precisely, I might want to change the default encoding of the matlab editor to GBK. Thank you.
Hi 涛,
You can change the encoding to GBK in a similar way -
feature('DefaultCharacterSet', 'GBK')
涛
le 25 Juil 2023
Thank you. I'll give it a try

Connectez-vous pour commenter.

Plus de réponses (0)

Catégories

En savoir plus sur Linear Algebra dans Centre d'aide et File Exchange

Produits

Version

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by