0

I have a record SAMPLEID (with a tab character at the end) in my mySQL database (5.7.30). When fetching it from DB, I get SAMPLEID	 instead of the original value in the record.

I googled 	 string and got to know that it represents a Unicode Hex Character Code representation of a Tab.

I tried decoding this string using URLDecoder java class's decode method. Passing in UTF-8, as encoding. Out of desperation, I tried multiple encoding US-ASCII, ISO-8859-1, UTF-8, UTF-16BE, UTF-16LE, UTF-16.

I also searched for in SO, but didn't found any relevant answer.

But none of them worked.

Thanks in advance!

devGeek
  • 213
  • 3
  • 7
  • 1
    That's not URL-encoded, so `URLDecoder` is not useful. It also has nothing to do with character encodings, so trying different character encodings does not make any difference. It seems to be an HTML entity. See [How to unescape HTML character entities in Java?](https://stackoverflow.com/questions/994331/how-to-unescape-html-character-entities-in-java) – Jesper Jul 03 '20 at 13:10
  • @Jesper That did the job. I was misdirected by the google search I guess. – devGeek Jul 03 '20 at 13:44

0 Answers0