generalized encoding

allow specifying specific encoding settings per domain