I try smack,everything’‘s fine,I can send Chinese message.But I can’‘t use Chinese username to login wildfile server.After several hours study,I think here’'s problem:
In StringUtils.java this method:
public static String encodeBase64(String data) {
byte[] bytes = null;
try {
bytes = data.getBytes(“ISO-8859-1”);<-------Here
}
catch (UnsupportedEncodingException uee) {
Log.error(uee);
}
return encodeBase64(bytes);
}
SASLMechanism.java using this method to generate auth text,and wild file will decode and find the username and password.
But if username is Chinese or UTF-8?getBytes(“ISO-8859-1”) will kill the original username.
In wildfile StringUtils.java,the same problem.So I think all these two file should change to make non-Ascii username work.