java - Change encoding of HttpServletResponse -


I have an API that gives XML, it actually returns using the default encoding (I believe That it is UTF-8), but now the requirements have been changed and we need to return everything in the UTF-16LE.

My question is: Is there an easy way to do this? The response has already been used before the call was completed to me, so I was thinking that I can do something like this

  // This method does not exist. The character encoding ("UTF -16LE ");  

Thanks a lot!

Update: The method mentioned is about to use. I was using an old version of the SabTi API (2.3) in which it was not included to change the version. It's all right.

uh, the method does exist,

Sets the character encoding (MIM charset) sent to the client, for example, UTF-8 if the letter encoding is already setContentType (java.lang.String) or setLocale (java .util.Locale), this method overrides it. Calling Set Content Type (java.lang.String) with the string of text / html and this method with the string of UTF-8 with the equivalent text / html string with the calling set content type; Charset = UTF-8


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

php - jQuery AJAX Post not working -