1
0
Fork 0
mirror of https://codeberg.org/Mercury-IM/Smack synced 2025-09-10 10:49:41 +02:00

Use Locale.US when doing String operations

on machine readable output. The default locale may not provide the
wanted mapping. See also
http://developer.android.com/reference/java/util/Locale.html#default_locale

SMACK-467
This commit is contained in:
Florian Schmaus 2014-04-03 22:50:13 +02:00
parent 94adaf8e50
commit d8a5610d7b
24 changed files with 67 additions and 39 deletions

View file

@ -54,6 +54,7 @@ import java.util.Collection;
import java.util.Iterator;
import java.util.LinkedList;
import java.util.List;
import java.util.Locale;
/**
* Creates a socket connection to a XMPP server. This is the default connection
@ -223,7 +224,7 @@ public class TCPConnection extends XMPPConnection {
throw new AlreadyLoggedInException();
}
// Do partial version of nameprep on the username.
username = username.toLowerCase().trim();
username = username.toLowerCase(Locale.US).trim();
String response;
if (saslAuthentication.hasNonAnonymousAuthentication()) {