Make getEncoding a static method.