Removed setEncoding because it destroys UTF-8 characters.