"host" command fails to resolve hostnames containing non-ASCII characters when executed non-interactively
Issue
-
When executing
host
command as part of a script or a service, i.e. in a non-interactive shell context, the hostnames containing non-ASCII characters cannot be resolved, e.g.$ crontab -e * * * * * host www.tribunal-fédéral.ch > /tmp/host.out $ sleep 60 $ cat /tmp/host.out Host www.tribunal-fédéral.ch not found: 3(NXDOMAIN)
-
The issue also occurs when piping the output while executing the command in an interactive shell, e.g.
$ host www.tribunal-fédéral.ch | tee /tmp/host.out Host www.tribunal-fédéral.ch not found: 3(NXDOMAIN)
Environment
-
Red Hat Enterprise Linux 8 and 9
- host (
bind-utils
)
- host (
-
Fedora 40
Subscriber exclusive content
A Red Hat subscription provides unlimited access to our knowledgebase, tools, and much more.