0

I have a C# Application working with HttpListener. I use get method to store datas and in get method, when i try to store it , utf-8 characterset problem is destroys data.

My code:

var context = listener.EndGetContext(result);
string message = context.Request.QueryString["msg"];

How can i make it UTF-8 Supported?

Coderbora
  • 11
  • 2
  • What is the error you are getting ? Can you please post some sample test data / expected result ? `QueryString` should work independent of the character encoding. It is also likely that your "msg" would be HtmlEncoded. You can decode using: `HtmlDecode` https://msdn.microsoft.com/en-us/library/7c5fyk1k(v=vs.110).aspx Also look at: https://stackoverflow.com/questions/18360991/how-does-request-querystring-work – Subbu Jul 02 '17 at 06:13
  • My error is in case of UTF-8 words it writes ????? or smth else but not the same as test data like that :✘✘✘✘✘✘ turns ?????? – Coderbora Jul 02 '17 at 09:28

0 Answers0