fix encode case