here you can use Smart decorator to get encoding