Open ghost opened 8 years ago
\uXXXX and \UXXXXXXXX is standard way to escape unicode in most programming languages and I see no urge here to invent something original
I think \UXXXXXXXX
is very ugly, is a historical flaw (\uXXXX
too). We don't need two modes to escape unicode characters. \u{...}
will become more popular with ECMAScript 6.
Swift2 and Rust both support \u{...}
now. https://github.com/rust-lang/rust/pull/19480/files
Okay!
I didn't know that.
We can make it more explicit by quoting, and no fix-width numbers:
"Apple is \u{1F34E}."
Also support multiple code points:
"Three apples: \u{1F34E,1F34E,1F34E}."