how to write Persian or Arabic in result of matlab
Show older comments
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 Comments
sajjad
on 21 Oct 2017
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
on 21 Oct 2017
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.
Answers (2)
Walter Roberson
on 29 Jan 2012
0 votes
Please start with the previous discussion at http://www.mathworks.com/matlabcentral/answers/6347-arabic-document . You will need to expand the comments there.
ali ganjbakhsh
on 21 Sep 2020
this might be worked:
fid=fopen('test.txt','rt');
ans=native2unicode(fread(fid,'*uint8'),'UTF-8') .';
ans=textscan(ans,'%s','delimiter',sprintf('\f'));
1 Comment
Walter Roberson
on 21 Sep 2020
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)
Categories
Find more on Data Import and Export in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!