hostnameIsNonAscii

Tests if hostname contains Unicode characters. If this returns true, you need to encode the hostname with glib.global.hostnameToAscii before using it in non-IDN-aware contexts.

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
hostnameIsNonAscii
(
string hostname
)

Parameters

hostname string

a hostname

Return Value

Type: bool

true if hostname contains any non-ASCII characters