Reputation: 1
I have a Urdu Optical character Recognition. When I convert my image text to Unicode and write it in notepad file it shows like "ÌÇ Ûã ˜Ç äíÇ ÝÑ " not in urdu language. Here is my code
disp(native2unicode(rst))
f = fopen('temp.txt', 'w', 'native', 'UTF-8');
s = char(native2unicode(rst));
fprintf(f, ' %s.\r\n', s);
fclose(f);
Upvotes: 0
Views: 113
Reputation: 1325
The following code runs fine on my system. Maybe the added 'UTF-8' parameter helped?
rst='اردو';
disp(native2unicode(rst,'UTF-8'))
s = char(native2unicode(rst,'UTF-8'));
f = fopen('temp.txt', 'w', 'native', 'UTF-8');
fprintf(f, ' %s.\r\n', s);
fclose(f);
Upvotes: 1