A: 

Try changing writer.Write(ip.Iso3166CountryCode) to writer.Write(UnicodeEncoding.Default.GetBytes(ip.Iso3166CountryCode)), that should work! :)

deltreme
Uh, that's the exact solution I posted, prior to your answer.
CantSleepAgain
Okay, the smiley is a bit small - I saw "don't answer" and my mouse started copy pasting on its own...
deltreme