On Sun, May 21, 2023 at 5:39 PM Bradley Lucier <lucier@math.purdue.edu> wrote:
 

For future proofing, it would be good to encode each category on its
own, in such a way that related categories are grouped together
numerically.  Perhaps the lowercase and uppercase letters, which need
case-changing tables, should still be last in the encoding.

There's really nothing to future-proof: the number of general categories is fixed, although it's possible that some characters may change categories.