Added fix for detecting unicode characters.