From: Ondřej Surý Date: Sat, 3 Nov 2018 19:20:41 +0000 (+0700) Subject: Enable IDN processing (both idnin and idnout) only on tty, disable it when the stdout... X-Git-Tag: v9.13.4~53^2~5 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=0e1bf7d017e4f6d787cbeb72cc2aa74e7f30122e;p=thirdparty%2Fbind9.git Enable IDN processing (both idnin and idnout) only on tty, disable it when the stdout is not a tty --- diff --git a/bin/dig/dighost.c b/bin/dig/dighost.c index 9750f140cd8..4daddbda7e3 100644 --- a/bin/dig/dighost.c +++ b/bin/dig/dighost.c @@ -625,7 +625,7 @@ make_empty_lookup(void) { looknew->ttlunits = false; looknew->qr = false; #ifdef HAVE_LIBIDN2 - looknew->idnin = (getenv("IDN_DISABLE") == NULL); + looknew->idnin = isatty(1)?(getenv("IDN_DISABLE") == NULL):false; looknew->idnout = looknew->idnin; #else looknew->idnin = false;