You may want to try Text.ASCIIEncoding.GetEncoding(Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage).GetCh ars() instead of Chr() and Text.ASCIIEncoding.GetEncoding(Globalization.CultureInfo.CurrentCulture.TextInfo.ANSICodePage).GetBy tes() instead of Asc(). I think that Chr and Asc are pretty much culture agnostic and don't do a good job for anything else other than the standard ASCII character set.