Decode upper case as well.

The attached commit changes the decoding so that A-Z are decoded as well. Also the decoding function doesn't do linear search anymore, so it's a bit faster. A test case is included as well.