Set encoding

Fast and loose fix for #109