If the database limit is the problem with signatures then use binary instead of text. For example, instead of storing "[ i ]" as text you can store a single byte, like 0x03. 0x01 = bold, 0x02 = underline, 0x03 = italic, 0x04 = center, 0x05 = quote, 0x06 = email, 0x07 = image, 0x08 = link, 0x09 = code, 0x0A = stop bold, 0x0B = stop underline, 0x0C = stop italic (etc). I think this would at least be worth a try. It would definitely allow more room, and shouldn't be that hard to implement, if it would even be hard to implement. That kind of thing is dreadfully easy in C++ and C...
Just some pseudo code:
void convertToBBC(char* pszOut, unsigned char* pInputSet)
{
strcpy(pszOut, "");
while(*pInputSet)
{
switch(*pInputSet)
{
case 1:
strcat(pszOut, "[b]");
break;
case 2:
strcat(pszOut, "[u]");
break;
case 3:
strcat(pszOut, "[i]");
break;
// etc
default:
char _c[2]; _c[0] = *pInputSet; _c[1] = 0;
strcat(pszOut, _c);
break;
}
pInputSet++;
}
}
Displaying it wouldn't be that hard either... (And yes I know I can optimize my code by a large margin, but I'm just trying to make a point).
Cheers,
-naota
I'm not a dictator to those that do stuff for me by will. Only those who don't.