for me this seems to be another problem. Maybe something went wrong during registration of your username and password - there are known issues with Openfire and Smack.
Java stores a String always as USC-16, so 2 bytes are use.
A simple example which shows the problem which you may have encountered:
String chatId = "€"; /* chatId uses two bytes, no matter which content it has */
byte b = chatId.getBytes("utf-8"); /* b is three bytes, could be 1 to 4 bytes depending on the content of chatId */
String encId = new String(b, "ISO8859-1"); /* this will fail, '€' is not in ISO8859-1, java converts it to â?¬ - so it uses now six bytes */
System.out.println(chatId +"!="+ encId); /* print out both strings and wonder why they are not equal */
What you do with your code is what I have posted here, you modify your username or password in a rather ugly way and then it works. But that’s a very bad idea, one should find and fix the root cause for this problem.