URL decoding: Difference between revisions
→{{header|langur}}
Langurmonkey (talk | contribs) |
|||
(7 intermediate revisions by 4 users not shown) | |||
Line 944:
=={{header|langur}}==
<syntaxhighlight lang="langur">
val finish = fn s:b2s(map(fn x:number(x, 16), rest(split("%", s))))
val
writeln
writeln
</syntaxhighlight>
Line 1,303 ⟶ 1,304:
mailto:"Irma User" <irma.user@mail.com>
</pre>
=={{header|PascalABC.NET}}==
<syntaxhighlight lang="delphi">
uses System;
function URLDecode(s: string) := Uri.UnescapeDataString(s);
begin
Println(URLDecode('http%3A%2F%2Ffoo%20bar%2F'));
Println(URLDecode('google.com/search?q=%60Abdu%27l-Bah%C3%A1'));
Println(URLDecode('%25%32%35'));
end.
</syntaxhighlight>
{{out}}
<pre>
http://foo bar/
google.com/search?q=`Abdu'l-Bahá
%25
</pre>
=={{header|Perl}}==
Line 1,686 ⟶ 1,707:
works like ''fromPercentEncoded'' and additionally decodes '+' with a space.
Both functions return byte sequences.
To decode Unicode characters it is necessary to convert them from UTF-8 with
<syntaxhighlight lang="seed7">$ include "seed7_05.s7i";
include "encoding.s7i";
Line 1,905 ⟶ 1,926:
=={{header|Wren}}==
{{libheader|Wren-fmt}}
<syntaxhighlight lang="
var urlDecode = Fn.new { |enc|
|