Hostname.toUnicode

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.

struct Hostname
static
string
toUnicode
(
string hostname
)

Parameters

hostname string

a valid UTF-8 or ASCII hostname

Return Value

Type: string

a UTF-8 hostname, which must be freed, or NULL if hostname is in some way invalid.

Meta

Since

2.22