Tests if hostname contains Unicode characters. If this returns
true, you need to encode the hostname with g_hostname_to_ascii()
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 g_hostname_is_non_ascii() and
g_hostname_is_ascii_encoded() to both return true for a name.
Parameters
hostname: string
a hostname
Returns boolean
true if hostname contains any non-ASCII characters
Tests if
hostnamecontains Unicode characters. If this returnstrue, you need to encode the hostname withg_hostname_to_ascii()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
g_hostname_is_non_ascii()andg_hostname_is_ascii_encoded()to both returntruefor a name.