better utf-8 handling