#23040: Clarify treatment of encoding and errors when component is bytes.

Patch by Wojtek Ruszczewski.
Merge: #23040: Clarify treatment of encoding and errors when component is bytes.