bool testEOF(char ch) { UnicodeCategory cat = Char.GetUnicodeCategory(ch); return (cat==UnicodeCategory.OtherNotAssigned); }