Add additional support for encoding.