Rank: 207234 based on 0 downloads (last 30 days) and 0 file submitted
Personal Profile:
Professional Interests:

 

Watch this Author's files

 

Comments and Ratings by Kai
Updated File Comments Rating
29 Mar 2014 JSONlab: a toolbox to encode/decode JSON files in MATLAB/Octave JSONlab is an open-source JSON/UBJSON encoder and decoder (parser) for MATLAB and Octave. Author: Qianqian Fang

Works great with Romanized characters. However, I ran into some character encoding issues. I am trying to read in script-type languages (Arabic, Urdu, Dari, Farsi, etc.) and the imported text is

{"text":"حمایت اتحادیه میوه فروشان و سبزی فروشان افغانستان از تیم اصلاحات و همگرایی؛\nحوالی ساعت 8 امشب 27 ماه حوت سال روان... http://t.co/AAcvfHxYAN","isoLanguageCode":"fa"}

Resulting text stored in the array:

حمایت اتحادیه میوه فروشان و سبزی فروشان افغانستان از تیم اصلاحات و همگرایی؛ حوالی ساعت 8 امشب 27 ماه حوت سال روان... http://t.co/AAcvfHxYAN

I can get the characters to show up properly from a text file if:
a. I set my local Language Settings for
Persian/Arabic and

b. I specify UTF-9 encoding during fopen

>> file = fopen('tweet.txt','r','n','UTF-8');
>> review = fread(file,'*char')';
>> fclose(file);

Any thoughts?

Contact us