Here is the solution:
SimpleDateFormat df = new SimpleDateFormat("EEE, dd MMM yyyy HH:mm:ss Z", Locale.US); try { volcanoListDate = df.parse(currentValue.replaceAll("\\p{Cntrl}", "")); } catch (ParseException e) { Log.d("VOLCANO_DEBUG", e.toString()); Log.d("VOLCANO_DEBUG", currentValue); }
An important change is .replaceAll ("\\ p {Cntrl}", "") , which removes control characters from the parsed string. The strange thing is that I do not see any of these characters with Notepad ++ in xml where the string is. However, obviously, there is something, and it works now.
Thanks for the help!
Nils blum-estest
source share