diff --git a/bin/dig/dig.c b/bin/dig/dig.c
index 39f74be3b3..4c34068992 100644
--- a/bin/dig/dig.c
+++ b/bin/dig/dig.c
@@ -193,8 +193,10 @@ help(void) {
" +[no]fail (Don't try next server on SERVFAIL)\n"
" +[no]header-only (Send query without a question section)\n"
" +[no]identify (ID responders in short answers)\n"
-" +[no]idnin (Parse IDN names)\n"
-" +[no]idnout (Convert IDN response)\n"
+#ifdef HAVE_LIBIDN2
+" +[no]idnin (Parse IDN names [default=on on tty])\n"
+" +[no]idnout (Convert IDN response [default=on on tty])\n"
+#endif
" +[no]ignore (Don't revert to TCP for TC responses.)\n"
" +[no]keepopen (Keep the TCP socket open between queries)\n"
" +[no]mapped (Allow mapped IPv4 over IPv6)\n"
diff --git a/bin/dig/dig.docbook b/bin/dig/dig.docbook
index bd7510e38b..5996b37101 100644
--- a/bin/dig/dig.docbook
+++ b/bin/dig/dig.docbook
@@ -789,7 +789,13 @@
Process [do not process] IDN domain names on input.
This requires IDN SUPPORT to have been enabled at
- compile time. The default is to process IDN input.
+ compile time.
+
+
+ The default is to process IDN input when standard output
+ is a tty. The IDN processing on input is disabled when
+ dig output is redirected to files, pipes, and other
+ non-tty file descriptors.
@@ -800,7 +806,13 @@
Convert [do not convert] puny code on output.
This requires IDN SUPPORT to have been enabled at
- compile time. The default is to convert output.
+ compile time.
+
+
+ The default is to process puny code on output when
+ standard output is a tty. The puny code processing on
+ output is disabled when dig output is redirected to
+ files, pipes, and other non-tty file descriptors.