Issue #16473: Merge codecs doc and test from 3.4 into 3.5