zhengyr / rest-client

Automatically exported from code.google.com/p/rest-client
Apache License 2.0
0 stars 0 forks source link

XML-Indentation changes encoding to UTF-16 #190

Closed GoogleCodeExporter closed 8 years ago

GoogleCodeExporter commented 8 years ago
What steps will reproduce the problem?
1. Perform a GET that receives an XML-result in the body
2. Indent the body with the function from the context menu
3. The encoding in the xml-header is now UTF-16 regardless of the original 
encoding
4. If you safe the response (menu File - Safe Response Body) the encoding is 
still unchanged

What is the expected output? What do you see instead?
The encoding must stay the same as before indentation.

What version of the product are you using? On what operating system?
Version 3.2.1 on Win7 Ent SP1 64

Please provide any additional information below.
The problem is LSSerializer used in XMLIndentUtil which by default sets the 
encoding to UTF-16. I provide a patch with JUnit tests to fix this behavior.

Original issue reported on code.google.com by csch...@googlemail.com on 14 Nov 2013 at 4:22

GoogleCodeExporter commented 8 years ago
Thanks for the patch. It is applied.

Original comment by subwiz on 15 Nov 2013 at 7:32