Using Matlab compiler, accents are replaced by question marks.

9 visualizaciones (últimos 30 días)
Rodrigo De oliveira
Rodrigo De oliveira el 3 de Jul. de 2019
Comentada: Walter Roberson el 7 de Feb. de 2023
Hi,
I have a tiny problem: in French, some words have accents. After compilation with Matlab compiler, accents are replaced by question marks. How can I solve this problem? Thank you for any help you can offer.
Rodrigo
  3 comentarios
Rodrigo De oliveira
Rodrigo De oliveira el 5 de Jul. de 2019
Movida: Stephen23 el 6 de Feb. de 2023
Hi GK,
For you to better understand, here is the lines code in my script (Matlab 2009a)
uicontrol(gcf,'style','push','pos',[xx1 yy1 dxx dyy],'String','Signaux déterministes',...
'FontSize',taicarb+3,'FontWeight','bold',...
'callback',['set(objsideal,''visible'',''off''),menu=1;,coulfenetre=coulde;,',...
'set(gcf,''WindowButtonMotionFcn'','''');SIDEALdeChoix'],...
'enable','on','backgroundcolor',coulde);
uicontrol(gcf,'style','push','pos',[xx2 yy2 dxx dyy],'String','Signaux aléatoires',...
'fontsize',taicarb+3,'backgroundcolor',coulal,'FontWeight','bold',...
'callback',['set(objsideal,''visible'',''off''),menu=2;,coulfenetre=coulal;,',...
'set(gcf,''WindowButtonMotionFcn'','''');SIDEALal'],'enable','on’);
As you see, there is an ” é ” in the lines code for the push button names "Signaux déterministes" and "Signaux aléatoires". But the ” é ” is replaced by a question mark after running the script as you can see in the screenshot below.
PastedGraphic-2.png
Thanks for your help
Best regards
Rodrigo
Marc Raventós Tato
Marc Raventós Tato el 6 de Feb. de 2023
Movida: Stephen23 el 6 de Feb. de 2023
Did you manage to solve this? I am facing the exact same problem now.

Iniciar sesión para comentar.

Respuestas (1)

Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 6 de Feb. de 2023
try using the ascii code for the letters that you want to be displayed, e.g.
disp(strcat('d',233,'terministes'))
déterministes
  3 comentarios
Constantino Carlos Reyes-Aldasoro
Constantino Carlos Reyes-Aldasoro el 7 de Feb. de 2023
I had similar problems changing from Mac to PC and between versions. But since using ASCII, even if it is a slight complication, I have not had those problems.
Walter Roberson
Walter Roberson el 7 de Feb. de 2023
In r2012 you got lucky that the characters you were interested in happened to be representable in 8 bits in your default character set. In current versions, utf-8 encoding is used so multibyte encoding is used. Apparently the compiler is not expecting utf-8 encoding.

Iniciar sesión para comentar.

Categorías

Más información sobre Function Creation en Help Center y File Exchange.

Etiquetas

Productos


Versión

R2019a

Community Treasure Hunt

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

Start Hunting!

Translated by