How to display Chinese character in edit text box in Matlab GUI?

조회 수: 6 (최근 30일)
i Have to display chinese characters from db were i am able to display it in matlab console
But in gui only junk characters is displayed i use
set(handles.edit1, 'String', mandarinTxtOut);%for display text in edittext

채택된 답변

Walter Roberson
Walter Roberson 2014년 2월 18일
편집: Walter Roberson 2014년 2월 18일
If you use style push you can do it. For example,
foo = uicontrol('Style','push', 'String','<HTML>AB&#21040;C');
  댓글 수: 1
Anandakumar Selvaraj
Anandakumar Selvaraj 2014년 2월 18일
i tried your code your code sir i am able to get out put with little modification but a seperate edit text field is created and display's at the bottom .
h = uicontrol('Style','edit');
s = sprintf(mandarinTxtOut');
set(h,'String',s)
insted can it be used to display the value on the the edit text box i placed in the figure like the set method i used which displayed the english value
set(handles.edit1, 'String', mandarinTxtOut);

댓글을 달려면 로그인하십시오.

추가 답변 (1개)

Anandakumar Selvaraj
Anandakumar Selvaraj 2014년 2월 27일
finally I found The Answer by my self its just a matter of Adding The DefaultCharacterSet to utf 8 i am able to display all chinese charactes this goes for all langauage just add your supportable characterset like this in your code
feature('DefaultCharacterSet', 'UTF8') %# for Chinese Character support
  댓글 수: 2
Lino Smaldo
Lino Smaldo 2015년 2월 22일
I tried to use the command
feature('DefaultCharacterSet', 'UTF8') %# for Chinese Character support
but it doesn't work, why? please help me
Avishai
Avishai 2015년 2월 24일
Me either. What should I do?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Environment and Settings에 대해 자세히 알아보기

Community Treasure Hunt

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

Start Hunting!

Translated by