I am running a simple java program which accepts a line from System.in and splits it for spaces.
public static void main(String[] args) {
Scanner sc = new Scanner(System.in);
String word="",type="";
while(!word.equalsIgnoreCase("stop")){
System.out.println("Enter word");
String devnagri = sc.nextLine();
String [] devnagriSpilt = devnagri.split(" ");
}
But whenever I give input in Devanagari script (Sctipt for Hindi and Marathi languages) it gets garbage characters. e.g. If I give input as एक दोन तीन चार Then is retrieved in variable devnagri as à¤�क दोन तीन चार
I have changed the property of java file and project named "Text file encoding" as UTF-8. Still it does not help. Is there any other Eclipse setting or JVM argument that needs to be setup ?