Fixes #6229 by adding `encode_upper` and `encode_upper_into_writer`. Also updated the documentation to be more like the rest of `core`.