static char Charshape(char s, int which)
{
int l, r, m;
if ((s >= '\u0621') && (s <= '\u06D3')) {
l = 0;
r = chartable.Length - 1;
while (l <= r) {
m = (l + r) / 2;
if (s == chartable[m][0]) {
return chartable[m][which + 1];
}
else if (s < chartable[m][0]) {
r = m - 1;
}
else {
l = m + 1;
}
}
}
else if (s >= '\ufef5' && s <= '\ufefb')
return (char)(s + which);
return s;
}