Appears to be a real server bug since i used InputSource with the encoding set to utf-8 and the characterStream set to a InputStreamReader(new ByteArrayInputStream(bytearrayoutputstream.toArray())) And the behaviour is the same.