URL decoding: Difference between revisions

Undo revision 224368 by Tigerofdarkness (talk)
m (Note does not support UTF-8.)
(Undo revision 224368 by Tigerofdarkness (talk))
Line 88:
 
=={{header|ALGOL 68}}==
{{works with|ALGOL 68G|Any - tested with release 2.8.3.win32}}
Algol 68 G has only 8-bit characters, so examples requiring UTF-8 cannot be handled.
<lang algol68># returns c decoded as a hex digit #
PROC hex value = ( CHAR c )INT: IF c >= "0" AND c <= "9" THEN ABS c - ABS "0"
Line 124 ⟶ 122:
 
# test the url decode procedure #
print( ( url decode( "http%3A%2F%2Ffoo%20bar%2F" ), newline ) );
print( ( url decode( "google.com/search?q=%60Abdu%27l-Bah%C3%A1" ), newline ) )
</lang>
{{out}}
<pre>
http://foo bar/
google.com/search?q=`Abdu'l-Bahá
</pre>
 
3,060

edits