hostnameIsAsciiEncoded

Tests if hostname contains segments with an ASCII-compatible encoding of an Internationalized Domain Name. If this returns true, you should decode the hostname with glib.global.hostnameToUnicode before displaying it to the user.

Note that a hostname might contain a mix of encoded and unencoded segments, and so it is possible for glib.global.hostnameIsNonAscii and glib.global.hostnameIsAsciiEncoded to both return true for a name.

bool
hostnameIsAsciiEncoded
(
string hostname
)

Parameters

hostname string

a hostname

Return Value

Type: bool

true if hostname contains any ASCII-encoded segments.