fix createGenerator encoding