diff --git a/cups-iso88591.patch b/cups-iso88591.patch
new file mode 100644
index 0000000..bb59300
--- /dev/null
+++ b/cups-iso88591.patch
@@ -0,0 +1,92 @@
+diff -up cups-2.2.1/CHANGES.txt.iso88591 cups-2.2.1/CHANGES.txt
+--- cups-2.2.1/CHANGES.txt.iso88591 2016-11-11 13:59:27.597903504 +0100
++++ cups-2.2.1/CHANGES.txt 2016-11-11 14:08:29.149806797 +0100
+@@ -1,6 +1,13 @@
+-CHANGES.txt - 2.2.1 - 2016-10-03
++CHANGES.txt - 2.2.2 - 2016-10-13
++
+ --------------------------------
+
++CHANGES IN CUPS V2.2.2
++
++ - The cups-lpd program did not catch all legacy usage of ISO-8859-1
++ (Issue #4899)
++
++
+ CHANGES IN CUPS V2.2.1
+
+ - Added "CreateSelfSignedCerts" directive for cups-files.conf to
+diff -up cups-2.2.1/doc/help/man-backend.html.iso88591 cups-2.2.1/doc/help/man-backend.html
+--- cups-2.2.1/doc/help/man-backend.html.iso88591 2016-11-11 14:00:00.589652892 +0100
++++ cups-2.2.1/doc/help/man-backend.html 2016-11-11 14:10:54.663706372 +0100
+@@ -61,7 +61,7 @@ function may be used to retrieve the cor
+
Backends are responsible for reading side-channel requests using the
+ cupsSideChannelRead()
+ function and responding with the
+-cupsSideChannelWrite()
++cupsSideChannelWrite()
+ function. The
+ CUPS_SC_FD
+ constant defines the file descriptor that should be monitored for incoming requests.
+@@ -147,7 +147,7 @@ CUPS backends can expect the following e
+
+ /etc/cups/cups-files.conf
+
+-CUPS backends are not generally design to be run directly by the user. Aside from the device URI issue (
++CUPS backends are not generally designed to be run directly by the user. Aside from the device URI issue (
+ argv[0]
+ and
+ DEVICE_URI
+diff -up cups-2.2.1/scheduler/cups-lpd.c.iso88591 cups-2.2.1/scheduler/cups-lpd.c
+--- cups-2.2.1/scheduler/cups-lpd.c.iso88591 2016-11-11 14:00:37.140376293 +0100
++++ cups-2.2.1/scheduler/cups-lpd.c 2016-11-11 14:15:09.836776667 +0100
+@@ -1650,16 +1650,24 @@ smart_strlcpy(char *dst, /* I - O
+ *dstptr++ = 0xc0 | (*srcptr >> 6);
+ *dstptr++ = 0x80 | (*srcptr++ & 0x3f);
+ }
+- else if ((*srcptr & 0xe0) == 0xc0)
++ else if ((*srcptr & 0xe0) == 0xc0 && (srcptr[1] & 0xc0) == 0x80)
+ {
++ /*
++ * 2-byte UTF-8 sequence...
++ */
++
+ if (dstptr > (dstend - 2))
+ break;
+
+ *dstptr++ = *srcptr++;
+ *dstptr++ = *srcptr++;
+ }
+- else if ((*srcptr & 0xf0) == 0xe0)
++ else if ((*srcptr & 0xf0) == 0xe0 && (srcptr[1] & 0xc0) == 0x80 && (srcptr[2] & 0xc0) == 0x80)
+ {
++ /*
++ * 3-byte UTF-8 sequence...
++ */
++
+ if (dstptr > (dstend - 3))
+ break;
+
+@@ -1667,8 +1675,12 @@ smart_strlcpy(char *dst, /* I - O
+ *dstptr++ = *srcptr++;
+ *dstptr++ = *srcptr++;
+ }
+- else if ((*srcptr & 0xf8) == 0xf0)
++ else if ((*srcptr & 0xf8) == 0xf0 && (srcptr[1] & 0xc0) == 0x80 && (srcptr[2] & 0xc0) == 0x80 && (srcptr[3] & 0xc0) == 0x80)
+ {
++ /*
++ * 4-byte UTF-8 sequence...
++ */
++
+ if (dstptr > (dstend - 4))
+ break;
+
+@@ -1680,7 +1692,7 @@ smart_strlcpy(char *dst, /* I - O
+ else
+ {
+ /*
+- * Orphan UTF-8 sequence, this must be an ISO-8859-1 string...
++ * Bad UTF-8 sequence, this must be an ISO-8859-1 string...
+ */
+
+ saw_8859 = 1;
diff --git a/cups.spec b/cups.spec
index 571dc11..eabf56f 100644
--- a/cups.spec
+++ b/cups.spec
@@ -15,7 +15,7 @@ Summary: CUPS printing system
Name: cups
Epoch: 1
Version: 2.2.1
-Release: 2%{?dist}
+Release: 3%{?dist}
License: GPLv2
Url: http://www.cups.org/
Source0: https://github.com/apple/cups/releases/download/v%{VERSION}/cups-%{VERSION}-source.tar.gz
@@ -62,6 +62,7 @@ Patch34: cups-avahi-no-threaded.patch
Patch35: cups-ipp-multifile.patch
Patch36: cups-web-devices-timeout.patch
Patch37: cups-synconclose.patch
+Patch38: cups-iso88591.patch
Patch100: cups-lspp.patch
@@ -255,6 +256,9 @@ Sends IPP requests to the specified URI and tests and/or displays the results.
%patch36 -p1 -b .web-devices-timeout
# Set the default for SyncOnClose to Yes.
%patch37 -p1 -b .synconclose
+# Unable to print from Windows (7) on a Cups-Server(2.2.1-1) with german umlauts in the filename (bug #1386751)
+%patch38 -p1 -b .iso88591
+
%if %{lspp}
# LSPP support.
@@ -617,6 +621,9 @@ rm -f %{cups_serverbin}/backend/smb
%{_mandir}/man5/ipptoolfile.5.gz
%changelog
+* Fri Nov 11 2016 Zdenek Dohnal - 1:2.2.1-3
+- Unable to print from Windows (7) on a Cups-Server(2.2.1-1) with german umlauts in the filename (bug #1386751)
+
* Mon Nov 07 2016 Zdenek Dohnal - 1:2.2.1-2
- #873123 - (cups-usb-quirks) usb printer doesn't print (usblp0: USB Bidirectional printer dev)