v.24.1New Feature

Added functions for encoding and decoding international domain names according to IDNA standard

Added functions punycodeEncode, punycodeDecode, idnaEncode and idnaDecode which are useful for translating international domain names to an ASCII representation according to the IDNA standard. #58454 (Robert Schulze).
Added functions punycodeEncode, punycodeDecode, idnaEncode, and idnaDecode to convert international domain names to and from their ASCII representation following the IDNA standard.

Why it matters

These functions solve the problem of handling internationalized domain names (IDNs) by providing a standardized way to encode and decode domain names with non-ASCII characters into their ASCII-compatible encoding (ACE). This enables users to work seamlessly with domain names containing Unicode characters in ClickHouse queries and data processing.

How to use it

Use the new functions in your SQL queries to encode or decode domain names. For example, use punycodeEncode(domain) to convert a Unicode domain name to its Punycode ASCII form, and punycodeDecode(domain) to convert back. Similarly, use idnaEncode(domain) and idnaDecode(domain) for IDNA encoding and decoding respectively.