I’m using a servlet to parse a log file and sends the data as json to a jsp page. The log file contains characters that JSON.parse() won’t handle. An example of strange characters is “»7í¿7í∏h”. I also know that my json format is correct.
I’ve tried reading/writing the file using utf-8, utf-16, iso-8859-1 and a few more but to no avail. Now I’m looking at finding the strange characters (which are very probably not needed) and ignoring them while reading the file in java.
Is there some way (perhaps in the servlet) I can find characters that json.parse() won’t be able to parse?
The solution was to change json parser from the standard json.parse() to json_parse.