I am playing with ICU and trying to write some classes around it. One of them is representing a code point. While I am about to write a constructor receiving a number, I would like to check wheter that number is valid as a code point.
Unfortunatelly I could not found a way in ICU to check the validity of a given UChar32 representing a code unit. ICU does return such type in some functions and does accept such UChar32 in some functions, but how can it be sure that we will not give it an invalid value?
I think there must be some validity check somewhere. Any idea?
Missed this one before.
#include <unicode/uchar.h>UChar32s will be betweenUCHAR_MIN_VALUEandUCHAR_MAX_VALUEinclusivelyUChar32s will evaulate false for(u_charType(ch) != U_UNASSIGNED)