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:
adrian.f.cole 2009-06-29 13:07:53 +00:00
parent 95e2c00aef
commit fcaa546356
1 changed files with 3 additions and 1 deletions

View File

@ -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);