use encode(s,s) fix platform problem