improved utf-8 encoding