Better UTF-8 support for external plugins