UTF-8 and charcters in Java and Eclipse IDE -


 public static void main(string[] args) throws unsupportedencodingexception {     string str = "अ";     byte[] bytes = str.getbytes("utf-8");     (byte b : bytes) {       system.out.print(b + "\t");     }     string hindi = new string(bytes, "utf-8");     system.out.println("\nhindi = " + hindi);     system.out.println((int) 'अ');   } 

output:

-32 -92 -123     hindi = अ 2309 

i need explanation on 3 outputs. last one.

also, copy paste character web page. how type manually in eclipse ide? example, alt + 65 give 'a' alt + 2309 not give me 'अ' (i copy paste again).

the links provided above should understand output you're getting in each case.


Comments

Popular posts from this blog

node.js - Bad Request - node js ajax post -

Why does Ruby on Rails generate add a blank line to the end of a file? -

keyboard - Smiles and long press feature in Android -