The documentation for isDefined() states that the character is "defined" if it has an entry or is in a range in the UnicodeData file . This identifies the set of code points that were assigned to the characters (and it could be better called isAssigned() ). As you found out, not all code points in the basic multilingual plan are still assigned to symbols ( this map shows where some of the empty spaces are).
However, even if a code point has not been assigned (i.e. isDefined() is false ), it can be assigned in a future version of Unicode and is still a valid code point. Encoding / decoding and working with unassigned code points are perfectly acceptable (although this is a bit strange).
source share