Replace usage of getEncoder() with _encoder