made the UTF-16 codec specializable with type params.