Allow overloading of encoding