unified TextEncoder Apis