Improve EncodingFilter class