Without using u
flag the hex range that can be used is [\\x{00}-\\x{ff}]
, but with u
flag it goes up to a 4-byte value \\x{7fffffff}
Unicode is a character set, which specifies a mapping from characters to code points, and the character encodings (UTF-8, UTF-16, UTF-32) specify how to store the Unicode code points.
In Unicode, a character maps to a single code point, but it can have different representation depending on how it is encoded.
I don't want to rehash this discussion all over again, so if you are still not clear about this, please read The Absolute Minimum Every Software Developer Absolutely, Positively Must Know About Unicode and Character Sets (No Excuses!).
Using the example in the question,