bugfix: name can include non-ascii characters that would cause a unicode encode error when trying sha1().