Fix handling of >0x7F UTF-8 characters in sscanf

This should fix #892.