A possible solution is to encode each character that is outside the ASCII character table (i.e., char> = 128 or character <32):
String source = @"ThβrΕ se Ramdally";
String result = String.Concat(source
.Select(c => (c < 128 && c > 31)
? c.ToString()
: String.Format("&#{0};", (int) c)));
source
share