Results 1 to 4 of 4
Thread: how to read urdu from url?
- 01-16-2012, 01:05 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 1
- Rep Power
- 0
how to read urdu from url?
Following the used to read and display the content. But not display urdu. Please help.
public static void main(String[] args){
String generate_URL = "http://classads.jang.com.pk/adds.asp?id=29&cityid=1";
System.setProperty("http.proxyHost","10.1.20.17");
System.setProperty("http.proxyPort", "8080");
try {
URL data = new URL(generate_URL);
URLConnection yc = data.openConnection();
BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream()));
String inputLine;
while ((inputLine = in.readLine()) != null) {
System.out.println(inputLine);
}
} catch (Exception e) {
e.printStackTrace();
}
}
- 01-16-2012, 01:50 PM #2
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
- 01-17-2012, 07:33 AM #3
Member
- Join Date
- Jan 2012
- Posts
- 1
- Rep Power
- 0
Re: how to read urdu from url?
Dear Tolls,
the following will read the content from given URL and display these content on console. The problem is that this content include urdu text which is not display correctly on console.
Please help me How I can read all content from URL that is either urdu or english and properly store in a file or display on console.
ThanksXML Code:public static void main(String[] args){ String generate_URL = "http://classads.jang.com.pk/adds.asp?id=29&cityid=1"; try { URL data = new URL(generate_URL); URLConnection yc = data.openConnection(); BufferedReader in = new BufferedReader(new InputStreamReader(yc.getInputStream())); String inputLine; while ((inputLine = in.readLine()) != null) { System.out.println(inputLine); } } catch (Exception e) { e.printStackTrace(); } }
Maleeha
- 01-17-2012, 09:47 AM #4
Moderator
- Join Date
- Apr 2009
- Posts
- 10,484
- Rep Power
- 16
Similar Threads
-
How to read currency money from Notpade instead of read all information from web
By Albert050 in forum NetBeansReplies: 0Last Post: 11-15-2011, 09:13 PM -
read this
By sluggo in forum Forum LobbyReplies: 1Last Post: 05-04-2011, 03:16 PM -
reading urdu, Arabic, Chinese, Japanese from url
By Basit781 in forum CLDC and MIDPReplies: 1Last Post: 06-03-2010, 06:26 AM -
java.io.IOException: Unable to read entire block; 493 bytes read before EOF; expected
By kushagra in forum New To JavaReplies: 5Last Post: 10-17-2008, 02:13 PM -
How to read the following
By rrp in forum New To JavaReplies: 0Last Post: 12-03-2007, 06:16 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks