to_utf8, Utf8Encoder: pass encoding as constructor parameter

Edit other files accordingly.