Added error handling. Only UTF-8 is supported!