encoder class : UrlDecode(string) method

Description

Decodes a string using URL encoding.

Syntax

encoderInstance.UrlDecode(string encodedString)

Arguments

ClassNameDescription
stringencodedStringA string encoded by URL encoding.

Return value

ClassDescription
stringA string decoded by URL encoding.

Sample code

1:

encoder e = new encoder();

2:

string encoded = "%E6%97%A5%E6%9C%AC%E8%AA%9E";

3:

string decoded = e.UrlDecode(encoded); // The result is "日本語".

Notes

It's a wrapper of the System.Web.HttpUtility.UrlDecode(String) method.

This method will decode using UTF-8.

Links for reference

Copyright © Cooker All rights reserved.