Cobra is inserting me ? characters in the returned elements in my dom tree instead of actual french or german characters..
InputStream is= url.openStream();
// Note that document builder should receive both contexts.
DocumentBuilderImpl dbi = new DocumentBuilderImpl(new ContextoAgenteUsuario());
// A documentURI should be provided to resolve relative URIs.
return dbi.parse(is);
First I thought that the file has an encoding issue, but the weird thing is that it does the same thing when I provide a String with this kind of characters…
final DocumentBuilderImpl documentBuilder = new DocumentBuilderImpl(new ContextoAgenteUsuario());
return documentBuilder.parse(new ByteArrayInputStream(html.getBytes("UTF-8")));
Can someone help me please.
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Cobra is inserting me ? characters in the returned elements in my dom tree instead of actual french or german characters..
InputStream is= url.openStream();
// Note that document builder should receive both contexts.
DocumentBuilderImpl dbi = new DocumentBuilderImpl(new ContextoAgenteUsuario());
// A documentURI should be provided to resolve relative URIs.
return dbi.parse(is);
First I thought that the file has an encoding issue, but the weird thing is that it does the same thing when I provide a String with this kind of characters…
final DocumentBuilderImpl documentBuilder = new DocumentBuilderImpl(new ContextoAgenteUsuario());
return documentBuilder.parse(new ByteArrayInputStream(html.getBytes("UTF-8")));
Can someone help me please.