Pass encoding parameter as string, not an object