isAscii package:gi-glib
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
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
hostnameIsNonAscii and
hostnameIsAsciiEncoded to both return
True for a name.
Since: 2.22
Determines if a string is pure ASCII. A string is pure ASCII if it
contains no bytes with the high bit set.
Since: 2.40