0

I am reading an xml file from Git and using it as as request to rest.

I am getting error Illegal character '0xa0' at offset .....

I tried to replace the characters using replaceAll("[\x00-\x09\x11\x12\x14-\x1F\x7F]", "") before sending the request. But still same error.

What exact character '0xa0' is and do i need to remove or encode it?

Jimi
  • 1
  • 1
  • 0xa0 is not in the given range, so no wonder it wasn't removed. In latin-1, it's used to encode non-breakable space. – choroba Apr 26 '18 at 16:50
  • So its hard space " ", how can I remove undesired space, as xml contains valid space also. – Jimi Apr 26 '18 at 19:02
  • The answer at the duplicate link has regex examples in several languages for matching/removing characters not allowed in XML. – kjhughes Apr 26 '18 at 20:35

0 Answers0