system/core: work around uint16_t vs. char16_t confusion