ONLINE HELP
 WINDEVWEBDEV AND WINDEV MOBILE

Help / WLanguage / WLanguage functions / Standard functions / String functions
  • Characters allowed in an encoded URL
  • Special cases
WINDEV
WindowsLinuxUniversal Windows 10 AppJavaReports and QueriesUser code (UMC)
WEBDEV
WindowsLinuxPHPWEBDEV - Browser code
WINDEV Mobile
AndroidAndroid Widget iPhone/iPadIOS WidgetApple WatchMac CatalystUniversal Windows 10 App
Others
Stored procedures
Decodes an encoded URL (which means with characters in %xx format).
Remark: The syntax of the URL is not checked.
Example
// Decodes a URL
DecodedURL is string = URLDecode("http://mysite/my%20report")
// DecodedURL contains: http://mysite/my report
Syntax
<Result> = URLDecode(<URL to decode> [, <Encoding/decoding format>])
<Result>: Character string
Character string containing the decoded URL. The following characters are converted:
  • '+' is converted to spaces
  • '%xx' (where xx is a hexadecimal value) is replaced by the character whose hexadecimal value is xx.
<URL to decode>: Character string
URL to be decoded.
<Encoding/decoding format>: Integer constant
Specifies the type of encoding. This parameter must be the same as the one used when encoding.
encodeURLToAnsiURL format. The encoded text only contains characters allowed in a URL. The decoded text is an ANSI string. This constant corresponds to the encodeURLFromAnsi constant used in URLEncode.
encodeURLToUnicodeURL format. The encoded text only contains characters allowed in a URL. The decoded text is a Unicode string. This constant corresponds to the encodeURLFromUnicode constant used in URLEncode.
encodeURLToUTF8
(Default value)
URL format. The encoded text only contains characters allowed in a URL. The decoded text is a UTF-8 string. This constant corresponds to the encodeURLFromUTF8 constant used in URLEncode.

AndroidAndroid Widget JavaPHP This parameter is not available.
Remarks

Characters allowed in an encoded URL

The list of characters allowed in an encoded URL is as follows:
;/?:@
&=+$,
-_.!~
*'(|)
%#digitsletters (uppercase and lowercase characters)

Special cases

  • Decoding an empty URL (empty string) returns an empty URL.
  • The %26%238364%3B string whose value is #8364; is replaced with the € symbol.
  • The % characters followed by invalid characters are ignored.
Component: wd290std.dll
Minimum version required
  • Version 9
This page is also available for…
Comments
Click [Add] to post a comment

Last update: 07/03/2023

Send a report | Local help