필터 지우기
필터 지우기

I cannot save matlab editor, the .m file.

조회 수: 81 (최근 30일)
Yuge Zhang
Yuge Zhang 2021년 8월 9일
답변: Walter Roberson 2021년 8월 12일
Hi,
When I save the .m file, it warning that " The matlab editor cannot use US-ASCII encoding to save the file, please use UTF-8 encoding to save the file ". Am I missing some kind of file? What do I need to do? The computer I use is MAC, the matlab version is R0221a.
Look forward to your reply!

답변 (3개)

Walter Roberson
Walter Roberson 2021년 8월 12일
Use Save As to save the file. The saving box that comes up will have a menu that allows you to select the format of the file to save as. Make sure that UTF8 is selected, not ISO-8896-1 and not "all .m files"

Constantino Carlos Reyes-Aldasoro
I guess that you must have used some special characters like accents, have you copy-pasted something into the editor?
  댓글 수: 2
Walter Roberson
Walter Roberson 2021년 8월 10일
Right, you can get this message if your file includes any character whose Unicode code is outside the range 0 to 255.
Yuge Zhang
Yuge Zhang 2021년 8월 12일
I can’t use it after I clean the computer. I suspect that some files have been deleted automatically.

댓글을 달려면 로그인하십시오.


DGM
DGM 2021년 8월 9일
You might want to check what your locale settings are
feature('locale')
and see if any of this is of use:
My understanding was that this should be utf8 in that version/env, but maybe yours is set to us-ascii for some reason.
This might also be of help.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by