Fix #201 encoding not defined