Support character encodings, set proper length when POSTing UTF-8 strings