Symbols not working after MATLAB update

17 次查看(过去 30 天)
Hello,
I updated MATLAB from 2018b to 2023a
Now all my scripts cannot display the ° or µ signs, that I have been using from the keyboard (using the German keyboard)
I realized I had to open a script and exchange all unidentifiable signs that have become a '?' . Otherwise I couldn't save the script. I had to save as .m with UTF 8. Then it saved but still the signs opened back up as '?'.
Is there a setting that lets me open my scripts with the correct signs? What can I do now?
Also: In my plots the same problem occurs with µm. Do I have to use \mu instead?
  5 个评论
Mario
Mario 2023-7-7
So it's not due to some wrong settings?
Mario
Mario 2023-7-10
编辑:Mario 2023-7-10
I saved my files now as UTF8 .m, but everytime I replace them and reopen them my µ and ° are turning into some ? signs again. What can I do?

请先登录,再进行评论。

回答(2 个)

Constantino Carlos Reyes-Aldasoro
Something similar to this happened to me when I migrated code from Windows to a Mac. It is annoying as things are not 100% transparent from system to system or version to version. What I did was not to use symbols but use \tex encoding, then those remain in any case (or has worked for me since). E.g.
figure
title('\mu \circ \int ','interpreter','tex')
Hope this helps

Shuba Nandini
Shuba Nandini 2023-8-30
Hello,
It is my understanding that you wanted to reserve the Unicode symbols even after reopening the script with UTF-8 encoding. I tried to create the script with the same symbols which you have mentioned. However, I was unable to reproduce the error at my end.
As a Temporary Workaround, you can use LaTeX-like escape characters in MATLAB scripts.
  • For (µ), you can use \mu.
  • For the degree symbol (°), you can use \circ.
Please refer to the below thread to know more:
I hope this helps you to resolve your issue!
Regards,
Shuba Nandini

类别

Help CenterFile Exchange 中查找有关 Startup and Shutdown 的更多信息

产品


版本

R2023a

Community Treasure Hunt

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

Start Hunting!

Translated by