Improved support for characters above 0x7f