Merge pull request #740 from owncloud/revert-669-master
[pub/Android/ownCloud.git] / src / com / owncloud / android / authentication / AuthenticatorActivity.java
index 97dcfde..0f7892e 100644 (file)
@@ -85,6 +85,7 @@ import com.owncloud.android.ui.dialog.IndeterminateProgressDialog;
 import com.owncloud.android.ui.dialog.SamlWebViewDialog;\r
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog;\r
 import com.owncloud.android.ui.dialog.SslUntrustedCertDialog.OnSslUntrustedCertListener;\r
+import com.owncloud.android.utils.DisplayUtils;\r
 \r
 /**\r
  * This Activity is used to add an ownCloud account to the App\r
@@ -356,7 +357,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         \r
         /// step 2 - set properties of UI elements (text, visibility, enabled...)\r
         mHostUrlInput = (EditText) findViewById(R.id.hostUrlInput);\r
-        mHostUrlInput.setText(mServerInfo.mBaseUrl);\r
+        // Convert IDN to Unicode\r
+        mHostUrlInput.setText(DisplayUtils.convertIdn(mServerInfo.mBaseUrl, false));\r
         if (mAction != ACTION_CREATE) {\r
             /// lock things that should not change\r
             mHostUrlInput.setEnabled(false);\r
@@ -737,6 +739,8 @@ SsoWebViewClientListener, OnSslUntrustedCertListener {
         showRefreshButton(false);\r
         \r
         if (uri.length() != 0) {\r
+            // Handle internationalized domain names\r
+            uri = DisplayUtils.convertIdn(uri, true);\r
             mServerStatusText = R.string.auth_testing_connection;\r
             mServerStatusIcon = R.drawable.progress_small;\r
             showServerStatus();\r