MATLAB: How to convert unicode into a string

stringtext formatunicide

Hi,
I have the following string, I want to know how can I convert it into a regular string (it is originally contains arabic characters)?
\u062a\u0648\u062f\u0647 \u0648 \u0634\u0645\u0627\u0631 \u0633\u0627\u0632\u0648\u0627\u0631\u0647\u0647\u0627\u06cc \u0632\u0646\u062f\u0647 \u062f\u0631 \u062c\u0627 \u06cc
Thanks in advance.

Best Answer

Unicode support is not very well explained in the doc. But it would appear that the following would work:
codedstring = '\u062a\u0648\u062f\u0647 \u0648 \u0634\u0645\u0627\u0631 \u0633\u0627\u0632\u0648\u0627\u0631\u0647\u0647\u0627\u06cc \u0632\u0646\u062f\u0647 \u062f\u0631 \u062c\u0627 \u06cc';
decodedstring = sprintf(strrep(codedstring, '\u', '\x'))
sprintf documentation states that \x is supposed to specify an ascii code, but it seems that actually it supports unicode, not ascii.