How to asign Unicode string to popup menu without fonr error?

조회 수: 1 (최근 30일)
binh23294
binh23294 2020년 9월 26일
댓글: binh23294 2020년 9월 27일
I use below command to asign Unicode string (Vietnamese) to popup menu but font display error
set(handles.popSoilState,'string',{'Chảy','Dẻo chảy'}');
Please help me! Thanks so much!

채택된 답변

Rik
Rik 2020년 9월 26일
Since you're using a release pre-R2020a, the default to store m-files is not UTF-8. That means any special character has a very high risk of being mangled. You need to explicitly put in the special chars like I did below, or load the text from a file.
f=figure(1);clf(1)
h=uicontrol('Parent',f,'style','popup','units','norm','position',[0.3 0.3 0.3 0.3]);
set(h,'string',{['Ch' 7843 'y'],['D' 7867 'o ch' 7843 'y']});

추가 답변 (0개)

카테고리

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

제품


릴리스

R2016a

Community Treasure Hunt

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

Start Hunting!

Translated by