strcpy(&buf[len], "&");
len += 5;
}
- else if (ch <= 0x7F) {
+ else if ((ch >= 0x20) && (ch <= 0x7F)) {
buf[len++] = ch;
buf[len] = 0;
}
- else if (ch > 0x7F) {
+ else if (ch < 0x20) {
+ /* we probably shouldn't be doing this */
+ buf[len++] = '_';
+ buf[len] = 0;
+ }
+ else {
char oct[10];
sprintf(oct, "&#%o;", ch);
strcpy(&buf[len], oct);
}
DeleteHashPos(&HashPos);
+ /* FIXME temp crap
+ StrBufAppendPrintf(themsg, "foo@bar.com\n");
+ StrBufAppendPrintf(themsg, "baz@quux.com\n");
+ StrBufAppendPrintf(themsg, "haha%c\n", 1);
+ StrBufAppendPrintf(themsg, "baaaz@quux.com\n");
+ StrBufAppendPrintf(themsg, "baaaz@quuuuuux.com\n");
+ */
+
/* Delete the old mortuary */
CtdlDeleteMessages(USERCONFIGROOM, NULL, 0, XMPPMORTUARY);