A tiny remark: don't set your bar for the upper limit so articially low (0x110000). I expect that sooner or later, Unicode will be extended to a wider range, and I see no reason for not using an upper limit that is as high as you technically can without increasing the storage size. That way you'll never have to edit your program in case that ever happens.
So, I assume that for storage in 24 bit, 0xFFFFFF would be a good value, and in 32 bit, 0x7FFFFFFF, the highest positive integer that will never pose a problem.