`gethostbyname()` is a system call, it should use UTF-8