DNS resolution failure with Unicode host name

421 views Asked by At

Recently, a strange bug has popped up with some clients of ours. After some deep diving into the logs provided by unity's developer console build, I've come across the following error: SocketException: Could not resolve host 'ן§¹ב· ו·©'

I've traced this error back to this line of code:

host = Dns.GetHostEntry(Dns.GetHostName());

where host is an IPHostEntry object. This is essentially just there to get the clients IP eventually, but was written by a previous programmer that no longer works here.

I'm not 100% sure what to make of this host name in the error log. From what I know, Dns.GetHostName() essentially returns your machine name as the DNS recognizes it, but it looks like for this specific client it returns some sort of gibberish.

We're from Israel, so is it possible the clients machine is named in Hebrew and thus the characters can't be resolved by Dns.GetHostEntry()?

0

There are 0 answers