How to solve UTF-8 decoding problem in sparkweb?

The chinese Characters sent or received from Sparkweb both cannot be recognized. Can anyone tell me how to solve the porblem? I used the openfire server and the chinese is supported well in spark.