idn2_to_ascii_8z(3)

idn2_to_ascii_8z3

Api function

Usage

#include <idn2.h>

int idn2_to_ascii_8z(const char * input, char ** output, int flags);

Arguments

const char * input

zero terminated input UTF-8 string.

char ** output

pointer to newly allocated output string.

int flags

optional idn2_flags to modify behaviour.

Overview

Convert UTF-8 domain name to ASCII string using the IDNA2008 rules. The domain name may contain several labels, separated by dots. The output buffer must be deallocated by the caller.

The default behavior of this function (when flags are zero) is to apply the IDNA2008 rules without the TR46 amendments. As the TR46 non-transitional processing is nowadays ubiquitous, when unsure, it is recommended to call this function with the IDN2_NONTRANSITIONAL and the IDN2_NFC_INPUT flags for compatibility with other software.

Return value: Returns IDN2_OK on success, or error code.

Since

2.0.0

Releases

5 releases since Debian 10 (Buster); the text changed 3 times.

  1. 10
  2. 11
  3. 12
  4. 13–Arch

Reporting bugs

Report bugs to <[email protected]>.
General guidelines for reporting bugs: https://www.gnu.org/gethelp/
Libidn2 home page: https://www.gnu.org/software/libidn2/

From libidn2 2.3.8-1 in Arch Linux 2026-11-07. Parsed by carta from the page's man source.