Add Generic encoding support