in reply to Unicode constant

From Identifier parsing:

If working under the effect of the use utf8; pragma, the following rules apply:
/ (?[ ( \p{Word} & \p{XID_Start} ) + [_] ]) (?[ ( \p{Word} & \p{XID_Continue} ) ]) * /x

And looking at the Unicode Character Properties of U+00B2 SUPERSCRIPT TWO, it's neither XID_Start nor XID_Continue. Although I'm not an expert on Unicode identifiers, this seems like it explains it.

Replies are listed 'Best First'.
Re^2: Unicode constant
by ikegami (Patriarch) on Nov 07, 2019 at 09:40 UTC

    Basically, identifiers can't contain symbols except "_". They can't contain "²" any more than "!". (Punctuation variables excepted.)