public byte[] CharToByte(String text, String encoding) {
char[] cc = text.ToCharArray();
byte[] b = new byte[cc.Length];
int ptr = 0;
int len = cc.Length;
for (int k = 0; k < len; ++k) {
char c = cc[k];
if (c == ' ')
b[ptr++] = (byte)c;
else if (c >= '\u2701' && c <= '\u27BE') {
byte v = table[c - 0x2700];
if (v != 0)
b[ptr++] = v;
}
}
if (ptr == len)
return b;
byte[] b2 = new byte[ptr];
Array.Copy(b, 0, b2, 0, ptr);
return b2;
}