case '"': fputs(""", fp); break;
default:
if (ch == 32) {
+#ifdef HAVE_MBSTOWCS
if (p <= cstr + 1 || !*p || *p == 32)
fputs(" ", fp); /* non-breaking space in unicode */
else
+#endif
fputc(32, fp);
} else if (ch < 32 || ch >= 127)
fprintf(fp, "&#%d;", (int)ch);
default:
if (ch > 255) {
pdf_put_char(buf, '?');
- } else if (ch >= 126 || ch < 32) {
+ } else if (ch > 125 || ch < 32) {
pdf_put_char(buf, ch);
- } else if (ch >= 0 && ch <= 255) {
+ } else {
char tmp[10];
snprintf(tmp, sizeof(tmp), "\\%03o", (int)ch);
pdf_puts(buf, tmp);