The Scala 3 syntax summary (not Scala 2.x, I was mistaken) says characters in single-quoted string literals are restricted to printableChar = “all characters in [\u0020, \u007F] inclusive”, except for " and \. Whereas triple-quoted strings can contain all Unicode characters.
In practice, the compiler accepts single-quoted Unicode string literals (eg "שלום"), and application code can rely on this. Should the spec guarantee this? Or should code treat this as an implementation detail and use triple quotes a lot?
Also, the compiler does not accept string literals with BIDI control characters (they must be \u-escaped). These are the characters matched by scala.reflect.internal.Chars.isBiDiCharacter in Scala 2:
A string literal is a sequence of characters in double quotes. The characters can be any Unicode character except the double quote delimiter or \u000A (LF) or \u000D (CR); or any Unicode character represented by an escape sequence.
This goes back to at least this commit from Dotty 0.5.5.
The Scala 3 compiler doesn’t have such a restriction, so I’m not sure if this was ever intended to be implemented.
I mistakenly thought that 2.x also said this, but apparently I was wrong, it’s only in 3.x. Sorry about the confusion, I’ll edit my post to clarify it’s about Scala 3.