Revert "Revert "Work around uint16_t vs. char16_t confusion""

This reverts commit 69ebf3ef5d3f1a74c6311c24f462bf50a66d956f.