### Function

# Camel host_idna_to_ascii

since: 3.16

#### Declaration [src]

    gchar*
    camel_host_idna_to_ascii (
      const gchar* host
    )

#### Description [src]

Converts IDN (Internationalized Domain Name) into ASCII representation. If there’s a failure or the `host` has only ASCII letters, then a copy of `host` is returned.

Available since: 3.16

#### Parameters

`host`

  Type: `const gchar*`

  Host name, with or without non-ascii letters in utf8.

  The argument can be `NULL`.
  The data is owned by the caller of the function.
  The value is a NUL terminated UTF-8 string.

#### Return value

Type: `gchar*`

Newly allocated string with only ASCII letters describing the `host` or `NULL`, when the `host` is `NULL`. Free the returned string with `g_free()` when no longer needed.

The caller of the function takes ownership of the data, and is responsible for freeing it.
The return value can be `NULL`.
The value is a NUL terminated UTF-8 string.