ML

URL tools

urlencode; V 2; 2009-02-23; converting plain text to URL encoded data
urldecode; V 2; 2009-02-23; converting URL encoded data to plain text

Synopsis and description

urlencode [--replace=characters] [--no-replace=characters] [--space] [text] ...
urldecode [--force] [url] ...

URL encode and decode tools convert data between plain text and URL encoding. They accept input data both from command line and standard input.

Downloading and compiling

Source code and manual pages: Requirements: Compiling and installing:
gcc -Wall -s -o/usr/local/bin/urlencode urlencode.c -larguments
gcc -Wall -s -o/usr/local/bin/urldecode urldecode.c -larguments

Examples

$ urlencode -R/ /~matlib/hacks/urltools/łąka.jpeg;echo
/~matlib/hacks/urltools/%C5%82%C4%85ka.jpeg
$

/~matlib/hacks/urltools/%C5%82%C4%85ka.jpeg

$ urldecode %CF%84%CE%AD%CF%87%CE%BD%CE%B7 \
> %CE%A6%CE%B9%CE%BB%CE%BF%CF%83%CE%BF%CF%86%CE%AF%CE%B1
τέχνη
Φιλοσοφία
$