Encoder now returns an EncodeResult instead of just a String