This week's book giveaway is in the Cloud/Virtualization forum.
We're giving away four copies of Kubernetes in Action and have Marko Luksa on-line!
See this thread for details.
Win a copy of Kubernetes in Action this week in the Cloud/Virtualization forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic

How to convert query parameter of an url to UTF-8 format.  RSS feed

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

My question is
How to convert query parameter of an url to UTF-8 format.

I have an url string which containing some query parameters of Non Ascii character.When I covert these non Ascii character to UTF-8,
it becomes either "?" or some square symbols.


I want the non ascii character should maintain its state after conversion.

Please suggest some solution for this.

Regards,
Saumya
 
Sheriff
Posts: 21187
87
Chrome Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Welcome to the Ranch!

You can use URLEncoder and URLDecoder for this. Both allow you to specify the encoding then encoding / decoding.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!