GLib.hostname_to_unicode (original) (raw)
Function
GLibhostname_to_unicode
since: 2.22
Declaration [src]
gchar*
g_hostname_to_unicode (
const gchar* hostname
)
Description [src]
Converts hostname
to its canonical presentation form; a UTF-8 string in Unicode normalization form C, containing no uppercase letters, no forbidden characters, and no ASCII-encoded segments, and not ending with a trailing dot.
Of course if hostname
is not an internationalized hostname, then the canonical presentation form will be entirely ASCII.
Available since: 2.22
Parameters
hostname
Type: const gchar*
A valid UTF-8 or ASCII hostname.
The data is owned by the caller of the function. |
---|
The value is a NUL terminated UTF-8 string. |
Return value
Type: gchar*
A UTF-8 hostname, which must be freed, or NULL
if hostname
is in some way invalid.
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. |