Change the way to generate encoding_map

HA HA HA. I am a commit hunger =))