This question has been asked here before, but not with any satisfying answers. Since all those answers, a new documented function mxArrayToUTF8String has appeared. I'm hoping to find the function that does the reverse: make an mxArray from a UTF-8 encoded C or C++ string. I'm OK with an undocumented function, or using a bit of code from someone else. I'm not OK with linking some huge Unicode library, which I have no use for. All I need is convert UTF-8 to UTF-16 (which seems to be what MATLAB uses in their mxChar arrays).
Does anybody have any experience with UTF-8 encoded strings in MATLAB?
What does The MathWorks suggest we do if we want to work with UTF-8 encoded strings?
Best Answer