v.24.1New Feature
Added functions for encoding and decoding international domain names according to IDNA standard
Added functionspunycodeEncode,punycodeDecode,idnaEncodeandidnaDecodewhich are useful for translating international domain names to an ASCII representation according to the IDNA standard. #58454 (Robert Schulze).
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, usepunycodeEncode(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.