I see some IDN code.
For example to get the punycode name to IDN I use
rrset.name.to_unicode()
Without IDN, to get rdata text I am using to_text.
For example to print a NS rdata (for example
ns1.xn--12c4cbf7aots1ayx.com.) I cannot use to_unicode.
AttributeError: 'NS' object has no attribute 'to_unicode'
Is there a way to tell to_text for rdata to convert names only (and not
other text) to IDN?
If not, my workaround is to check for rrtypes with rrnames and get
those to text and then convert just that part.
For example to convert the MNAME and RNAME SOA fields in the
following to IDN:
xn--12c4cbf7aots1ayx.com. 976 IN SOA
ns1.xn--12c4cbf7aots1ayx.com.
hostmaster.xn--12c4cbf7aots1ayx.com.
2020020800 14400 3600 1209600 86400
(I don't want to write my own routines for every rrtype with names in
the rdata.)
Is there a way to do this in dnsypython currently? (And if so, how I can
find documentation for this? I have searched and looked through code.)
I was thinking something like to_text(idna_codec=dns.name.IDNA_2003) but
I think that was idea before to_unicode() ?
Thank you