Commit 211127fc authored by Gaston Dombiak's avatar Gaston Dombiak Committed by gaston

Fixed i18n bug. A charset was not being used to read.


git-svn-id: http://svn.igniterealtime.org/svn/repos/messenger/trunk@429 b35dd754-fafc-0310-a699-88a17e54d16e
parent f6c94975
......@@ -27,6 +27,11 @@ import javax.xml.stream.*;
public class SocketReadThread extends Thread {
private Socket sock;
/**
* The utf-8 charset for decoding and encoding Jabber packet streams.
*/
private String charset = "UTF-8";
private XMLInputFactory xppFactory;
private XMLStreamReader xpp;
......@@ -84,8 +89,9 @@ public class SocketReadThread extends Thread {
*/
public void run() {
try {
xpp = xppFactory.createXMLStreamReader(new InputStreamReader(sock.getInputStream()));
// TODO: need to force to UTF-8 ?
xpp =
xppFactory.createXMLStreamReader(new InputStreamReader(sock.getInputStream(),
charset));
// Read in the opening tag and prepare for packet stream
createSession();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment