string - reading unicode input from user in java -


i have simple console program in java, try input user input in hebrew "שלום" when tried read ???? , wish "שלום" , how best way?

my code:

   public static void main(string[] args)  {      string s;     scanner in = new scanner(system.in);     system.out.println("enter string");     s = in.nextline();     system.out.println(s); } 

}

output:

run:

enter string

שלום

????

build successful (total time: 5 seconds)

i know should use utf-8 dont know how... help?


Comments

Popular posts from this blog

Delphi XE2 Indy10 udp client-server interchange using SendBuffer-ReceiveBuffer -

Qt ActiveX WMI QAxBase::dynamicCallHelper: ItemIndex(int): No such property in -

Enable autocomplete or intellisense in Atom editor for PHP -