Encode Text as UTF-8 before highlighting (fixes #468)