I have a text file "abc.txt" encoded in utf-8 data being a set of emoticons from wikipedia page:
(^_^) happy
My code extracts this info from the file to the netbeans stdout
My code:
public static void main(String[] args) throws FileNotFoundException {
Scanner sc=new Scanner(new File("abc.txt"));
while(sc.hasNext()){
System.out.println(sc.nextLine());
}
}
In netbeans the output is this :
While in console the output is:
What is this character?
And how do I remove this?