fix printMessage' s encode