This repository was archived by the owner on Aug 31, 2021. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 227
Expand file tree
/
Copy pathURLDecode.lcdoc
More file actions
65 lines (45 loc) · 2.05 KB
/
URLDecode.lcdoc
File metadata and controls
65 lines (45 loc) · 2.05 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
Name: URLDecode
Type: function
Syntax: the URLDecode of <formString>
Syntax: URLDecode(<formString>)
Summary:
<return|Returns> the <decode|decoded> form of a <URL> that was
<encode|encoded> for posting to an <HTTP> <server>.
Introduced: 1.0
OS: mac, windows, linux, ios, android
Platforms: desktop, server, mobile
Example:
URLDecode("A+B%2F1+2") -- returns "A B/1 2"
Example:
put URLDecode(field "Test URL") after URLToCheck
Parameters:
formString (string):
Returns:
The <URLDecode> <function> <return|returns> the <formString> with plus
<sign|signs> "+" converted to spaces and characters in the form %NN
converted to the ASCII equivalent of the <hexadecimal> number NN.
Description:
Use the <URLDecode> <function> to <decode> a <URL> that has been sent by
another system.
When the <URLDecode> function encounters a percent sign (%), it treats
the next two characters as <hexadecimal> digits. (If one of the
<characters> is not a <hexadecimal> digit, it's treated as a zero.) The
number is converted to its <character> equivalent, using the
<character set> currently in use.
>*Note:* Non-ASCII characters, such as Unicode, that appear in the URL
> string to be decoded will have been encoded as UTF-8 (as per standard
> convention), requiring the use of the <textDecode> <function(glossary)>
> after urlDecode. For example, the following code:
local tEncodedText
put "%D1%81%D0%BA%D0%BE%D1%80%D0%BE%D1%81%D1%88%D0%B8%D0" & \
"%B2%D0%B0%D1%82%D0%B5%D0%BB%D1%8C" into tCodedText
put textDecode(urlDecode(tEncodedText),"UTF-8")
> produces the word "скоросшиватель".
References: post (command), function (control structure),
decompress (function), macToISO (function), arrayDecode (function),
charToNum (function), baseConvert (function), textDecode (function),
decode (glossary), return (glossary), sign (glossary), encode (glossary),
character set (glossary), hexadecimal (glossary), server (glossary),
function (glossary), URL (keyword), characters (keyword),
character (keyword), http (keyword), httpHeaders (property)
Tags: networking