fix bug in global var def in encoding.h