c# - Replace ASCII characters with their equivalent -


I am setting a value in the cookie using cookies and receiving the contents of the cookie in the back code.

But the problem is that I am storing the string with some special characters or white space characters, when I am retrieving the contents of the cookie, converting special symbols into ASCII equivalents are given.

For example, if I want to store in the Adam - (SET) cookie, then it will be Adam% 20-% 20% 28SET% 29 I am getting converted and archived and when I am recovering it, I get the same Adam% 20-% 20% 28SET% 29 . But I can get this code under the code .

How do I get it? help please.

in C #

Use: / P>

  string is decoded = HTTTY. Urlcode (encoded string);   

The built-in function that can be used by other options which you can use in .NET Framwework (see below).

If necessary, you can specify an encoding.

or:

  string is decoded = URI.UnescapeDataString (s);   

See the documentation for some alerts. javascript

  var decoded = decodeurIComponent (s) in   

; Before jumping on using unescape as suggested in other queries, read. You may also want to read.

Comments

Popular posts from this blog

Python SQLAlchemy:AttributeError: Neither 'Column' object nor 'Comparator' object has an attribute 'schema' -

java - How not to audit a join table and related entities using Hibernate Envers? -

mongodb - CakePHP paginator ignoring order, but only for certain values -