diff --git a/ghostscript-pdf-charset-conv.patch b/ghostscript-pdf-charset-conv.patch new file mode 100644 index 0000000..de9d0b9 --- /dev/null +++ b/ghostscript-pdf-charset-conv.patch @@ -0,0 +1,17 @@ +diff -up ghostscript-9.09/devices/vector/gdevpdfe.c.pdf-charset-conv ghostscript-9.09/devices/vector/gdevpdfe.c +--- ghostscript-9.09/devices/vector/gdevpdfe.c.pdf-charset-conv 2013-08-21 15:06:40.000000000 +0100 ++++ ghostscript-9.09/devices/vector/gdevpdfe.c 2013-08-22 16:33:24.665075217 +0100 +@@ -380,10 +380,10 @@ pdf_xmp_write_translated(gx_device_pdf * + } + memset(buf1, 0x00, (j * sizeof(UTF16)) + 2); + for (i = 0; i < j; i++) { +- if (buf0[i] <= 0x7f || buf0[0] >= 0xAE) { +- if (buf0[0] == 0x7f) { ++ if (buf0[i] <= 0x7f || buf0[i] >= 0xAE) { ++ if (buf0[i] == 0x7f) { + emprintf1(pdev->memory, "PDFDocEncoding %x cannot be represented in Unicode\n", +- buf0[0]); ++ buf0[i]); + } else + buf1[(i * 2) + 3] = buf0[i]; + } else { diff --git a/ghostscript.spec b/ghostscript.spec index 9909ca2..ff7464d 100644 --- a/ghostscript.spec +++ b/ghostscript.spec @@ -5,7 +5,7 @@ Summary: A PostScript interpreter and renderer Name: ghostscript Version: %{gs_ver} -Release: 1%{?dist} +Release: 2%{?dist} # Included CMap data is Redistributable, no modification permitted, # see http://bugzilla.redhat.com/487510 @@ -25,6 +25,7 @@ Patch6: ghostscript-Fontmap.local.patch Patch7: ghostscript-iccprofiles-initdir.patch Patch8: ghostscript-gdevcups-debug-uninit.patch Patch9: ghostscript-wrf-snprintf.patch +Patch10: ghostscript-pdf-charset-conv.patch Requires: urw-fonts >= 1.1, ghostscript-fonts Requires: poppler-data @@ -125,6 +126,9 @@ rm -rf expat freetype icclib jasper jpeg lcms lcms2 libpng openjpeg zlib cups/li # Use more caution when converting floats to strings (bug #980085). %patch9 -p1 -b .wrf-snprintf +# Fixed character set conversion issue in pdfwrite (bug #999927). +%patch10 -p1 -b .pdf-charset-conv + # Convert manual pages to UTF-8 from8859_1() { iconv -f iso-8859-1 -t utf-8 < "$1" > "${1}_" @@ -315,6 +319,9 @@ rm -rf $RPM_BUILD_ROOT %{_libdir}/libgs.so %changelog +* Thu Aug 22 2013 Tim Waugh 9.09-2 +- Fixed character set conversion issue in pdfwrite (bug #999927). + * Thu Aug 22 2013 Tim Waugh 9.09-1 - 9.09.