Fix specification of encoding

Closes #4