Re: [go-nuts] Should an IPv4 address input to idna.Registration.ToASCII() return an error or not?

2022-11-12 Thread Kurtis Rader
I think you've misunderstood the purpose of that package and the relevant standards. An IPv4 address is syntactically a valid domain name and thus no error occurs. The ToASCII conversion is a nop in this case since there are no non-ASCII characters. An IPv6 address is not a syntactically valid

[go-nuts] Should an IPv4 address input to idna.Registration.ToASCII() return an error or not?

2022-11-12 Thread redder
https://go.dev/play/p/HdLLJz0uz2q idna.Registration.ToASCII("100.100.100.100") doesn't return an error. Surely an IPv4 address can never be registered as a domain name and so this should return an error? I just need confirmation: is this function working as expected or is this a bug? -- You