mirror of https://github.com/apache/jclouds.git
changed to correctly address Byte-Order mark
git-svn-id: http://jclouds.googlecode.com/svn/trunk@1871 3d8758e0-26b5-11de-8745-db77d3ebf521
This commit is contained in:
parent
086bab21f3
commit
7dd111435b
|
@ -27,7 +27,6 @@ import static com.google.common.base.Preconditions.checkNotNull;
|
||||||
import static org.jclouds.http.HttpConstants.PROPERTY_SAX_DEBUG;
|
import static org.jclouds.http.HttpConstants.PROPERTY_SAX_DEBUG;
|
||||||
|
|
||||||
import java.io.InputStream;
|
import java.io.InputStream;
|
||||||
import java.io.InputStreamReader;
|
|
||||||
|
|
||||||
import javax.annotation.Resource;
|
import javax.annotation.Resource;
|
||||||
|
|
||||||
|
@ -103,7 +102,8 @@ public class ParseSax<T> implements Function<HttpResponse, T> {
|
||||||
xml = IOUtils.toInputStream(response);
|
xml = IOUtils.toInputStream(response);
|
||||||
}
|
}
|
||||||
parser.setContentHandler(handler);
|
parser.setContentHandler(handler);
|
||||||
InputSource input = new InputSource(new InputStreamReader(xml, "UTF-8"));
|
// This method should accept documents with a BOM (Byte-order mark)
|
||||||
|
InputSource input = new InputSource(xml);
|
||||||
parser.parse(input);
|
parser.parse(input);
|
||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
StringBuilder message = new StringBuilder();
|
StringBuilder message = new StringBuilder();
|
||||||
|
|
Loading…
Reference in New Issue