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.
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.
Log in to post a comment.
Sign up for the SourceForge newsletter:
You seem to have CSS turned off.
Please don't fill out this field.