The Gnutella sha1 encoding is BASE32 Uppercase.
For my own use I wrote a sha1_gnutella utility in python. You can find it in the Magma package on PyPI:
Python Package Index : magma 0.3.9
Just install it to get the script sha1_gnutella.py which gives you the sha1 values of files.