dangdangdotcom / dubbox

Dubbox now means Dubbo eXtensions, and it adds features like RESTful remoting, Kyro/FST serialization, etc to the Dubbo service framework.
http://dangdangdotcom.github.io/dubbox
Apache License 2.0
4.89k stars 2.06k forks source link

使用fastjson序列化时未设置编码,可能产生乱码 #271

Open chshyin opened 7 years ago

chshyin commented 7 years ago

FastJsonSerialization中 public ObjectOutput serialize(URL url, OutputStream output) throws IOException { return new FastJsonObjectOutput(output); }

public ObjectInput deserialize(URL url, InputStream input) throws IOException {
    return new FastJsonObjectInput(input);
}

,output的writeUTF和input的readUTF,均未指定编码,当消费者和服务提供者编码不一致会产生乱发进而导致json反序列化异常