The following java code does exactly what is expected:
1 String s = "♪♬♪♪♬♪♪♬♪♪♬♪♪♬♪♪♬♪";
2 for(int i=0; i < s.length(); i++)
3 {
4 System.out.print(s.substring(i,i+1));
5 //System.out.print("\r");
6 Thread.currentThread().sleep(500);
7 }
But when I try to add carriage return by commenting in line 5 it goes printing ?s. Why is it and how will I fix it?
(I also tried with "\u240d" for carriage return - same thing).
EDIT: The output goes to a bash on Mac OS X.