generic try except for unicode errors