Hi everybody,
I want to get the HTML source code of a page like:
http://morfix.mako.co.il/default.aspx?q=connection&source=milon
(the page is in hebrew)
But, after entering a hebrew page the characters I get are like
� ׳�׳ ׳’׳�׳™ ׳¢׳‘׳¨׳™ ׳¢׳™׳‘׳¨׳™, ׳�׳™׳�׳•׳� ׳�׳ ׳’׳�׳™
I want to see the Hebrew as it is.
The current code:
public static void main(String[] args) throws Exception {
Scanner input = new Scanner(System.in);
String a= input.next();
URL yahoo = new URL(a);
URLConnection yc = yahoo.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
String inputLine;
JTextArea tt= new JTextArea();
JFrame f = new JFrame();
f.add(tt);
f.setVisible(true);
JScrollPane bar = new JScrollPane();
tt.setAutoscrolls(true);
tt.add(bar);
while ((inputLine = in.readLine()) != null) {
tt.append("\n"+inputLine);
}
a=input.next();
System.out.print(a);
in.close();
}
}
How to solve the issue.
Any help will be appreciated!