Most of the time this method will be used with a constant and the error
will be thrown away anyway. By not returning an error we can use this
function to initialize global variables. The function EncoderByName should
be used when working with user provided input and we care about the error.