"""Encoding and decoding tests in various ways.

Fragments available:
 base -- representing numbers as strings in various bases
 dequote -- undoing the 'quoted-printable' encoding used in e-mails
 Huffman -- text-compressor using the Huffman coding
 morse -- using dots and dashes to represent text
 radix050 -- an archaic base-fourty text encoding

$Id: __init__.py,v 1.1 2007/03/24 16:04:35 eddy Exp $
"""

from string import atoi

def unurl(text):
    ans = ''
    while text:
        if text[0] == '%':
            ans += chr(string.atoi(text[1:3], 16))
            text = text[3:]
            continue
        elif text[0] == '+': ans += ' '
        else: ans += text[0]
        text = text[1:]
    return ans
