The application is producing undecoded characters like šđćž due to an encoding error during JSON or HTML writing. The m2json.m file needs to be modified to ensure proper UTF-8 encoding before escaping special characters. The suggested solution is to add the unicode2native(val, 'UTF-8') function before line 43 in m2json.m.
41| else
42| val = unicode2native(val, 'UTF-8'); % Convert to UTF-8
43| val = checkescape(val); % add escape characters
44| valstr = sprintf(\"\"\"%s\"\"\", val);