In java what's different between Character.isBmpCodePoint
and Character.isValidCodePoint
?
I mean, I know 0x10FFFF
and 0xFFFF
, but what does it imply? Which should I use?
In java what's different between Character.isBmpCodePoint
and Character.isValidCodePoint
?
I mean, I know 0x10FFFF
and 0xFFFF
, but what does it imply? Which should I use?
The Basic Multilingual Plane (BMP) is a subset of legal code points in Unicode (see Wikipedia).
But let's have a look into the official documentation.
true if the specified code point value is between MIN_CODE_POINT and MAX_CODE_POINT inclusive; false otherwise.
MIN_CODE_POINT
: U+0000
MAX_CODE_POINT
: U+10FFFF
true if the specified code point is between MIN_VALUE and MAX_VALUE inclusive; false otherwise.
MIN_VALUE
: '\u0000'
MAX_VALUE
: '\uFFFF'
The documentation has a slightly confusing usage of types here, but it's easy to see that the upper inclusive limits differ, 0xFFFF is below 10FFFF.