Improve type handling
Use proper UTF8 encoding