Actually it's because the string is terminated with an ASCII Carriage Return (decimal 10), which is not allowed by the OSC spec, so it gets rejected.