mirror of https://github.com/apache/jclouds.git
Issue 70, hard set encoding to UTF-8 to avoid silent errors that result in characters being converted to '???'
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1490 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
95e2c00aef
commit
fcaa546356
|
@ -92,7 +92,9 @@ public class ParseSax<T> extends HttpFutureCommand.ResponseCallable<T> {
|
||||||
IOUtils.closeQuietly(xml);
|
IOUtils.closeQuietly(xml);
|
||||||
xml = IOUtils.toInputStream(response);
|
xml = IOUtils.toInputStream(response);
|
||||||
}
|
}
|
||||||
parser.parse(new InputSource(xml));
|
InputSource input = new InputSource(xml);
|
||||||
|
input.setEncoding("UTF-8");
|
||||||
|
parser.parse(input);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
StringBuilder message = new StringBuilder();
|
StringBuilder message = new StringBuilder();
|
||||||
message.append("Error parsing input for ").append(handler);
|
message.append("Error parsing input for ").append(handler);
|
||||||
|
|
Loading…
Reference in New Issue