how to write Persian or Arabic in result of matlab
14 次查看(过去 30 天)
显示 更早的评论
when i want to have a text (that is in persian) i have the problem that is show ???? but i have write سلام how can i solve this problem plz help me :(
2 个评论
sajjad
2017-10-21
The problem can be solved using the following command: slCharacterEncoding('UTF-8') the above command will change the character set encoding to be compatible with persian or arabic language.
Walter Roberson
2017-10-21
That will work for some versions of MATLAB on some operating systems, but it did not working in 2012 when the question was originally asked, if I recall correctly.
回答(2 个)
Walter Roberson
2012-1-29
Please start with the previous discussion at http://www.mathworks.com/matlabcentral/answers/6347-arabic-document . You will need to expand the comments there.
0 个评论
ali ganjbakhsh
2020-9-21
this might be worked:
fid=fopen('test.txt','rt');
ans=native2unicode(fread(fid,'*uint8'),'UTF-8') .';
ans=textscan(ans,'%s','delimiter',sprintf('\f'));
1 个评论
Walter Roberson
2020-9-21
That would have to do with reading a file that has been encoded as uint8, and would not solve displaying Persian.
You should make sure to fclose(fid)
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Entering Commands 的更多信息
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!