Fixed wrong content-length setting for non-ascii chars