Symbols not working after MATLAB update

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 Comments

Please share a few more details. First and formost your operating system and your language/local settings.
Then please confim the scenarios: Typing in the command editor, the "classic" editor, the live editor?
This may depend on the font which you are using, so you may want to double check that. Same thing happened to me a while back.
Windows 10 Enterprise 2016 LTSB
Version 10.0.14393 Build 14393
System location is Germany
System language is English.
I have been using the classic editor so far.
The font is set to the default, which is Monospaced in 2018b as well as in 2023a.
In 2018b I used font size 12. In 2023a I use font size 9 now.
Should be the same font, but they look like 2 different fonts. Everything looks more narrow in the newer version. So a bit compressed in the horizontal, which is useful to me because you see more of the code that is beyond the line...
So it's not due to some wrong settings?
Mario
Mario on 10 Jul 2023
Edited: Mario on 10 Jul 2023
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?

Sign in to comment.

Answers (2)

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
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

Categories

Find more on Environment and Settings in Help Center and File Exchange

Products

Release

R2023a

Asked:

on 28 Jun 2023

Answered:

on 30 Aug 2023

Community Treasure Hunt

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

Start Hunting!