diff options
Diffstat (limited to 'juick-ws/src/main')
-rw-r--r-- | juick-ws/src/main/java/com/juick/ws/s2s/Connection.java | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/juick-ws/src/main/java/com/juick/ws/s2s/Connection.java b/juick-ws/src/main/java/com/juick/ws/s2s/Connection.java index b187aa3e..83cc18ac 100644 --- a/juick-ws/src/main/java/com/juick/ws/s2s/Connection.java +++ b/juick-ws/src/main/java/com/juick/ws/s2s/Connection.java @@ -13,6 +13,7 @@ import javax.net.ssl.TrustManager; import javax.net.ssl.X509TrustManager; import java.io.*; import java.net.Socket; +import java.nio.charset.Charset; import java.security.*; import java.security.cert.CertificateException; import java.util.UUID; @@ -142,7 +143,7 @@ public class Connection { parser = new MXParser(); parser.setFeature(XmlPullParser.FEATURE_PROCESS_NAMESPACES, true); parser.setInput(new InputStreamReader(socket.getInputStream())); - writer = new OutputStreamWriter(socket.getOutputStream()); + writer = new OutputStreamWriter(socket.getOutputStream(), Charset.forName("UTF-8")); streamID = UUID.randomUUID().toString(); } } |