set encodings in the generator

@jdoconnor