aboutsummaryrefslogtreecommitdiff
path: root/juick-ws/src/main/java/com
diff options
context:
space:
mode:
authorGravatar Vitaly Takmazov2016-11-08 15:14:57 +0300
committerGravatar Vitaly Takmazov2016-11-08 15:14:57 +0300
commit397179619fdfa0b4b15f62437a91bd17924e7678 (patch)
treedc382f1e05a4fc49e300d292bf7a7afeca1b2092 /juick-ws/src/main/java/com
parent7e8e8f8d709318cce97f40adaee8a4abbdc2b960 (diff)
xmpp: always use UTF-8 for output
Diffstat (limited to 'juick-ws/src/main/java/com')
-rw-r--r--juick-ws/src/main/java/com/juick/ws/s2s/Connection.java3
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();
}
}