Fix passing an Encoding to decode and related functions.