Make sure to always call getEncoding