c17e2ce
diff -up kdelibs-3.5.10/configure.in.than kdelibs-3.5.10/configure.in
c17e2ce
--- kdelibs-3.5.10/configure.in.than	2017-06-20 18:02:22.845910412 +0200
c17e2ce
+++ kdelibs-3.5.10/configure.in	2017-06-20 18:03:09.058172814 +0200
c17e2ce
@@ -692,10 +692,10 @@ AC_ARG_WITH(libidn,
c17e2ce
   [], with_libidn=check)
c17e2ce
 LIB_IDN=
c17e2ce
 if test "x$with_libidn" != xno; then
c17e2ce
-  AC_CHECK_HEADERS([idna.h punycode.h stringprep.h])
c17e2ce
-  KDE_CHECK_LIB(idn, idna_to_ascii_4i, [
7d92d7b
+  AC_CHECK_HEADERS([idn2.h])
7d92d7b
+  KDE_CHECK_LIB(idn2, idn2_to_ascii_4i, [
c17e2ce
     AC_DEFINE_UNQUOTED(HAVE_LIBIDN, 1, [Defined if you have libidn in your system])
c17e2ce
-    LIB_IDN=-lidn
c17e2ce
+    LIB_IDN=-lidn2
c17e2ce
   ])
c17e2ce
   if test "x$with_libidn" != xcheck && test -z "$LIB_IDN"; then
c17e2ce
     AC_MSG_ERROR([--with-libidn was given, but test for libidn failed])
c17e2ce
diff -up kdelibs-3.5.10/kdecore/configure.in.in.than kdelibs-3.5.10/kdecore/configure.in.in
c17e2ce
--- kdelibs-3.5.10/kdecore/configure.in.in.than	2017-06-20 17:53:41.544511539 +0200
c17e2ce
+++ kdelibs-3.5.10/kdecore/configure.in.in	2017-06-20 18:01:27.557989259 +0200
c17e2ce
@@ -48,10 +48,10 @@ AC_ARG_WITH(libidn,
c17e2ce
   [], with_libidn=check)
c17e2ce
 LIB_IDN=
c17e2ce
 if test "x$with_libidn" != xno; then
c17e2ce
-  AC_CHECK_HEADERS([idna.h punycode.h stringprep.h])
c17e2ce
-  KDE_CHECK_LIB(idn, idna_to_ascii_4i, [
c17e2ce
+  AC_CHECK_HEADERS([idn2.h])
7d92d7b
+  KDE_CHECK_LIB(idn2, idn2_to_ascii_4i, [
c17e2ce
     AC_DEFINE_UNQUOTED(HAVE_LIBIDN, 1, [Defined if you have libidn in your system])
c17e2ce
-    LIB_IDN=-lidn
c17e2ce
+    LIB_IDN=-lidn2
c17e2ce
   ])
c17e2ce
   if test "x$with_libidn" != xcheck && test -z "$LIB_IDN"; then
c17e2ce
     AC_MSG_ERROR([--with-libidn was given, but test for libidn failed])
7d92d7b
diff -up kdelibs-3.5.10/kdecore/network/kresolver.cpp.than kdelibs-3.5.10/kdecore/network/kresolver.cpp
7d92d7b
--- kdelibs-3.5.10/kdecore/network/kresolver.cpp.than	2017-06-21 12:55:55.733217103 +0200
7d92d7b
+++ kdelibs-3.5.10/kdecore/network/kresolver.cpp	2017-06-21 13:27:38.956737181 +0200
7d92d7b
@@ -49,8 +49,8 @@
7d92d7b
 #include <qguardedptr.h>
7d92d7b
 
7d92d7b
 // IDN
7d92d7b
-#ifdef HAVE_IDNA_H
7d92d7b
-# include <idna.h>
7d92d7b
+#ifdef HAVE_IDN2_H
7d92d7b
+# include <idn2.h>
7d92d7b
 #endif
7d92d7b
 
7d92d7b
 // KDE
7d92d7b
@@ -1083,7 +1083,7 @@ static QStringList splitLabels(const QSt
7d92d7b
 
7d92d7b
 static QCString ToASCII(const QString& label)
7d92d7b
 {
7d92d7b
-#ifdef HAVE_IDNA_H
7d92d7b
+#ifdef HAVE_IDN2_H
7d92d7b
   // We have idna.h, so we can use the idna_to_ascii
7d92d7b
   // function :)
7d92d7b
 
7d92d7b
@@ -1104,7 +1104,7 @@ static QCString ToASCII(const QString& l
7d92d7b
     ucs4[i] = (unsigned long)label[i].unicode();
7d92d7b
   ucs4[i] = 0;			// terminate with NUL, just to be on the safe side
7d92d7b
 
7d92d7b
-  if (idna_to_ascii_4i(ucs4, label.length(), buf, 0) == IDNA_SUCCESS)
7d92d7b
+  if (idn2_to_ascii_4i(ucs4, label.length(), buf, 0|IDN2_NFC_INPUT|IDN2_NONTRANSITIONAL) == IDN2_OK)
7d92d7b
     // success!
7d92d7b
     retval = buf;
7d92d7b
 
7d92d7b
@@ -1117,7 +1117,7 @@ static QCString ToASCII(const QString& l
7d92d7b
 
7d92d7b
 static QString ToUnicode(const QString& label)
7d92d7b
 {
7d92d7b
-#ifdef HAVE_IDNA_H
7d92d7b
+#ifdef HAVE_IDN2_H
7d92d7b
   // We have idna.h, so we can use the idna_to_unicode
7d92d7b
   // function :)
7d92d7b
 
7d92d7b
@@ -1131,7 +1131,7 @@ static QString ToUnicode(const QString&
7d92d7b
   // try the same length for output
7d92d7b
   ucs4_output = new Q_UINT32[outlen = label.length()];
7d92d7b
 
7d92d7b
-  idna_to_unicode_44i(ucs4_input, label.length(),
7d92d7b
+  idn2_to_unicode_44i(ucs4_input, label.length(),
7d92d7b
 		      ucs4_output, &outlen,
7d92d7b
 		      0);
7d92d7b
 
7d92d7b
@@ -1141,7 +1141,7 @@ static QString ToUnicode(const QString&
7d92d7b
       delete [] ucs4_output;
7d92d7b
       ucs4_output = new Q_UINT32[outlen];
7d92d7b
 
7d92d7b
-      idna_to_unicode_44i(ucs4_input, label.length(),
7d92d7b
+      idn2_to_unicode_44i(ucs4_input, label.length(),
7d92d7b
 			  ucs4_output, &outlen,
7d92d7b
 			  0);
7d92d7b
     }