Fix for non-utf8 characters causing exception

UnicodeDecodeError: 'utf8' codec can't decode byte 0xae in position 13:
invalid start byte
In pdf with that contain non-utf8 characters,  name.decode("utf-8")
throws an exception. 
The character that is causing the problem in the pdf is ®