Note that there are some explanatory texts on larger screens.

plurals
  1. POJava, URL output different in java output
    primarykey
    data
    text
    <p>I have a question about URI and URL when i pass a url is work good but result is worst need help!!</p> <p>as my code look like this.</p> <pre><code>import java.io.*; import java.net.*; import java.net.URL; public class isms { public static void main(String[] args) throws Exception { try { String user = new String ("boo"); String pass = new String ("boo"); String dstno = new String("60164038811"); //You are going compose a message to this destination number. String msg = new String("你的哈达哈达!"); //Your message over here int type = 2; //for unicode change to 2, normal will the 1. String sendid = new String("isms"); //Malaysia does not support sender id yet. // Send data URI myUrl = new URI("http://www.isms.com.my/isms_send.php?un=" + user + "&amp;pwd=" + pass + "&amp;dstno=" + dstno + "&amp;msg=" + msg + "&amp;type=" + type + "&amp;sendid=" + sendid); URL url = new URL(myUrl.toASCIIString()); URLConnection conn = url.openConnection(); conn.setDoOutput(true); // Get the response BufferedReader rd = new BufferedReader(new InputStreamReader(conn.getInputStream())); String line; while ((line = rd.readLine()) != null) { // Print the response output... System.out.println(line); } rd.close(); System.out.println(url); } catch (Exception e) { e.printStackTrace(); } } } </code></pre> <p>the output in web is different.. on my java output is </p> <blockquote> <p>你的哈达哈达!</p> </blockquote> <p>but on my the site is</p> <blockquote> <p>ÄãµÄ¹þ´ï¹þ´ï!</p> </blockquote> <p>Help!!</p>
    singulars
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload