I’ve always used “\r” as line break on mac but lately (big sur, m1) I’m having some weird issues when printing strings using “\r”
string m = ""; m += "testing string new line\r"; m += "and another line\r"; cout << m << endl;
works OK in XCode output, but not in Bash or Zsh
the output is just one line with some characters of the previous lines if they are larger, like
and another lineew line
using “\n” instead solves but I’m intrigued about that. anybody else noticed this change?
are terminals now treating “\r” as carriage return, literally like a typewriter?