필터 지우기
필터 지우기

ASCII characters in code?

조회 수: 3 (최근 30일)
Luca
Luca 2024년 4월 25일
댓글: Fangjun Jiang 2024년 4월 26일
I have a little problem with the display of some characters in my matlab code. The header of data i read from a text file contains special characters, which i need to write down into my code. E.g. one column has the Name "T / °C". Now every time i close and reopen Matlab, the parts in my code are displayd like this: "T / �C". So everyday i have to replace all occurances of this character, and of course it is not the only character. Is there a way to solve this. I did not find any setting in the preferences.
Thank you!
  댓글 수: 6
Walter Roberson
Walter Roberson 2024년 4월 26일
You should change the encoding to UTF-8

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

답변 (1개)

Pooja Kumari
Pooja Kumari 2024년 4월 25일
Hello,
I think this typically suggests that MATLAB is misinterpreting the encoding format of your script files, especially if those files are saved in an encoding that accommodates special characters, such as UTF-8, but MATLAB seems to be reading them using an alternative encoding specification.

카테고리

Help CenterFile Exchange에서 Characters and Strings에 대해 자세히 알아보기

제품


릴리스

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by