Results 1 to 4 of 4
  1. #1
    Maleehafaisal is offline Member
    Join Date
    Jan 2012
    Posts
    1
    Rep Power
    0

    Default 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();
    }
    }

  2. #2
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,438
    Rep Power
    18

    Default Re: how to read urdu from url?

    Quote Originally Posted by Maleehafaisal View Post
    Following the used to read and display the content. But not display urdu. Please help.

    Java Code:
    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();
            }
        }
    What does it display?
    ANd please use code tags when posting...

  3. #3
    Maleeha is offline Member
    Join Date
    Jan 2012
    Posts
    1
    Rep Power
    0

    Default 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.

    XML 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();
            }
        }
    Thanks

    Maleeha

  4. #4
    Tolls is offline Moderator
    Join Date
    Apr 2009
    Posts
    11,438
    Rep Power
    18

    Default Re: how to read urdu from url?

    And what does it display?
    You didn't answer that part...

Similar Threads

  1. Replies: 0
    Last Post: 11-15-2011, 09:13 PM
  2. read this
    By sluggo in forum Forum Lobby
    Replies: 1
    Last Post: 05-04-2011, 03:16 PM
  3. reading urdu, Arabic, Chinese, Japanese from url
    By Basit781 in forum CLDC and MIDP
    Replies: 1
    Last Post: 06-03-2010, 06:26 AM
  4. Replies: 5
    Last Post: 10-17-2008, 02:13 PM
  5. How to read the following
    By rrp in forum New To Java
    Replies: 0
    Last Post: 12-03-2007, 06:16 PM

Tags for this Thread

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •