change custom encoding api
2.2.0