Java: use URLDecoder but reserve the plus sign (+)
I am writing a lucene server. I want to receive a post request like:
http://www.site.com/search?+title:google + type: website
but the post argument "+ title: google + type: website" is encoded like this: "+ title: google% 20 + type: website" so I use URLDecoder.decode (argument, "UTF-8") to get the original input, but i am getting wrong result:
"title: goole type: website" because URLDecoder converts the plus sign "+" to the space character "". What can I do to get the decoding argument without converting the plus sign?
source to share