X-Git-Url: https://git.octo.it/?a=blobdiff_plain;f=src%2Frrd_gfx.c;h=5841d50867883e5c9d27581261ba31b649ab82bd;hb=e9fb580fcf041573054e5bcf2184fa7811f9dd59;hp=fc1da9bb53c34b4b82b3dda81276fe4c563b8405;hpb=136884ea547f02dee1d06f25fd95b9bcf6f1c952;p=rrdtool.git diff --git a/src/rrd_gfx.c b/src/rrd_gfx.c index fc1da9b..5841d50 100644 --- a/src/rrd_gfx.c +++ b/src/rrd_gfx.c @@ -1,5 +1,5 @@ /**************************************************************************** - * RRDtool 1.2.11 Copyright by Tobi Oetiker, 1997-2005 + * RRDtool 1.2.12 Copyright by Tobi Oetiker, 1997-2005 **************************************************************************** * rrd_gfx.c graphics wrapper for rrdtool **************************************************************************/ @@ -1081,9 +1081,11 @@ static void svg_write_text(FILE *fp, const char *text) 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); @@ -2032,9 +2034,9 @@ static void pdf_put_string_contents_wide(pdf_buffer *buf, const afm_char *text) 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);