PLFENG-1280: Fix the bad encoding bug