#281404 support for different encodings