dig: Incorrect encoding to punycode
Summary
Incorrect/invalid output when trying to encode the domain: ☺.unicode.
It appears the punycode encoder generates a domain label that includes a space. Several punycode generators do this, including dnspython and Python's IDNA encoding built-in.
This came up while performing testing ahead of migrating towards a new system of handling DNS records which uses Python, however, we've subsequently identified that it affects dig as well.
BIND version used
9.11.5-P4-5.1-Debian (From Debian Buster)
Steps to reproduce
$ dig ☺.unicode
What is the current bug behavior?
dig: 'xn--\032o-oia59s.unicode.' is not a legal IDNA2008 name (string contains a disallowed character), use +noidnout
What is the expected correct behavior?
I'd expect dig to look up the A record for the correctly encoded domain. I'm not sure what the correctly encoded domain is, although my suspicion is that it should be xn--xba3f15e.unicode.
Relevant configuration files
Not sure that any config files are actually relevant - if there are, please let me know.