Fix #201 encoding not defined

#201