MATLAB Answers

0

Running Matlab, accents are replaced by question marks in the outputs

Asked by Rodrigo De oliveira on 7 Jul 2019
Latest activity Commented on by madhan ravi
on 8 Jul 2019
Hello !
I already mentioned my tiny problem but I think I did a bad manipulation, so I didn't have a complete answer. So I start again, simplifying the example that illustrates my problem.
In French, some words have accents. After running program with Matlab 2019, accents are replaced by question marks in the outputs. How can I solve this issue ?
As an example and to better understand the issue, here some lines code of ones of my program written with Matlab 2009a
dimec=get(0,'ScreenSize');
uicontrol(gcf,'style','push','pos',[0.114*dimec(3) 0.4*dimec(4) 0.12*dimec(3) 0.06*dimec(4)],'String','Signaux déterministes',...
'FontSize',19,'FontWeight','bold',...
'callback',['disp(''Hello'')'],'backgroundcolor',[0.8000 0.4000 0.8000]);
As you see, there is an ” é ” in the lines code for the push button name "Signaux déterministes". But the ” é ” is replaced by a question mark after running the script as you can see in the screenshot below.
Thanks for any help you can offer.
Rodrigo

  0 Comments

Sign in to comment.

Tags

Products


Release

R2019a

1 Answer

Answer by the cyclist
on 7 Jul 2019
Edited by the cyclist
on 7 Jul 2019

Your code renders correctly for me in R2019a, on a mac running mojave.
There are some ideas in response to this question that could be helpful for you. In particular, I think looking at the output of
feature('DefaultCharacterSet')
and setting that value to something else, seems like the most promising. FYI, my value of that is 'ISO-8859-1'.

  1 Comment

Rodrigo De oliveira comments:
Yes !!! It works.
I had
feature('DefaultCharacterSet','UTF8')
I replaced by
feature('DefaultCharacterSet')
and it works. But I don't understand why since I believed that UTF8 was universal. Anyway, I'm glad that it works now. Thank you very much "the cyclist"
Rodrigo

Sign in to comment.