i have a problem with parsing a UTF-16LE encoded html file.
I have set encoding with:
Parser parser=new Parser(PathToHtmlFile);
parser.setEncoding("UTF-16")
I tried to println the file with:
NodeList list = parser.parse (null);
SimpleNodeIterator sNI=list.elements();
while(sNI.hasMoreNodes()){
System.out.println(sNI.nextNode().getText());}
but all i got is this:
???????????????????????????????????????????????????????...... (etc.)
What could be the problem?
Could someone help me ?
Best regards
Jonas
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Hello together,
i have a problem with parsing a UTF-16LE encoded html file.
I have set encoding with:
Parser parser=new Parser(PathToHtmlFile);
parser.setEncoding("UTF-16")
I tried to println the file with:
NodeList list = parser.parse (null);
SimpleNodeIterator sNI=list.elements();
while(sNI.hasMoreNodes()){
System.out.println(sNI.nextNode().getText());}
but all i got is this:
???????????????????????????????????????????????????????...... (etc.)
What could be the problem?
Could someone help me ?
Best regards
Jonas