Subject: bug#51954: 29.0.50; puny-encode doesn't normalize

From: Eli Zaretskii <[email-masked]>
Date: Thu, 18 Nov 2021 20:40:46 +0200

> From: Lars Ingebrigtsen <[email-masked]>
> Date: Thu, 18 Nov 2021 18:06:47 +0100
> 
> I'm reading
> 
> https://www.unicode.org/reports/tr36/
> 
> which says that IDNA should normalise the strings before encoding (and
> lowercase, too?)

Yes.  See also http://www.unicode.org/reports/tr46/.

> (puny-encode-string (ucs-normalize-NFKC-string "Bä.com"))
> => "xn--B.com-gra"

NFKC or NFC?

> So I think puny-encode-string should do that first, if I'm reading TR36
> right.

Agreed.