Click here to Skip to main content
15,898,999 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have this error code is
What is this error and how do I correct it?
this is my code and this error for it.

C#
ret = Uri.UnescapeDataString(ret);
            ret = WebUtility.HtmlDecode(ret);
            return ret;
Posted

1 solution

By default, the EscapeDataString method converts all characters except for RFC 2396 unreserved characters to their hexadecimal representation. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the EscapeDataString method converts all characters, except for RFC 3986 unreserved characters, to their hexadecimal representation. All Unicode characters are converted to UTF-8 format before being escaped.
This method assumes that stringToEscape has no escape sequences in it.
By default, the string is escaped according to RFC 2396. If International Resource Identifiers (IRIs) or Internationalized Domain Name (IDN) parsing is enabled, the string is escaped according to RFC 3986 and RFC 3987. See these RFCs for a definition of reserved and unreserved characters.
For more information on IRI support, see the Remarks section for the Uri class.

http://msdn.microsoft.com/en-us/library/system.uri.escapedatastring.aspx[^]

http://blog.nerdbank.net/2009/05/uriescapedatapath-and.html[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900