private static bool IsPrintableStringCharacter(char c)
{
// ITU-T X.680 (11/2008)
// 41.4 (PrintableString)
// Latin Capital, Latin Small, Digits
if ((c >= 'A' && c <= 'Z') ||
(c >= 'a' && c <= 'z') ||
(c >= '0' && c <= '9'))
{
return true;
}
// Individually included characters
switch (c)
{
case ' ':
case '\'':
case '(':
case ')':
case '+':
case ',':
case '-':
case '.':
case '/':
case ':':
case '=':
case '?':
return true;
}
return false;
}