backcompat macros for the utf8 stuff for 5.16

not entirely sure if this is fully accurate, but it looks right enough