Psique - 2009-10-19

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.