I neglected to say anything about UTF-32: You just take the
code point and write it as 4 bytes, even though the high 11
bits will always be 0.
No one in their right mind would use this for file storage and transmission. It is sometimes used as an internal format by C programmers (perhaps, lazy C programmers?).