Should gnutls_server_name_set convert the domain name to ACE as per RFC4366 3.1 where it talks about IDNA (RFC 3490)? Using libidn function call can make this occur using idna_to_ascii_8z can make this happen though this is adding dependency.